Each of the following questions is worth 4 points.
a statement
a function
an argument
a string
a literal
a function call
anything that can be turned into a value
7 // 2
3
True and False
True and False
True and False
False
True or False
True
an infinite loop
Control C
parameters
if signal == "green":
print("Go")
elif signal == "yellow":
print("Slow")
elif signal == "red":
print("Stop")
else:
print("Error")
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: "))
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)
def odd_even_print(num):
if num % 2 == 0:
print("Even")
else:
print("Odd")