Each of the following questions is worth 4 points.
a statement
True and False
True and False
a literal
anything that can be turned into a value
an infinite loop
a string
7 // 2
3
an argument
a function call
parameters
Control C
True or False
True
True and False
False
a function
def odd_even_print(num):
if num % 2 == 0:
print("Even")
else:
print("Odd")
for loop that prints the odd numbers from 3
to 11. range function
with 3 arguments. for num in range(3, 12, 2):
print(num)
while loop that asks the user for an even number. while num % 2 == 1:
print(num, "is not an even number")
num = int(input("Even number: "))
if signal == "green":
print("Go")
elif signal == "yellow":
print("Slow")
elif signal == "red":
print("Stop")
else:
print("Error")