Each of the following questions is worth 4 points.
parameters
while
loop with the following header ever stop?
while True:
no
a local variable
2 + 3 * 5
17
from the corresponding argument in the function call
no
7 ** 2
49
while
loop when the boolean expression
after the keyword while
becomes false?
the loop stops
for
loop get its values?
from the list of values after in
True or False
True
an infinite loop
True and False
*=
Control C
True and False
False
def is_divisible_by_seven(num):
if num % 7 == 0:
print("True")
else:
print('False')
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 prints the numbers 5, 10, 15,
each on a separate line. while
loop.
num = 5
while num < 15:
print(num)
num += 5
if score >= 90:
print("A")
elif score >= 80:
print("B")
elif score >= 70:
print("C")
elif score >= 60:
print("D")
else:
print("F")