Multiple Choice Identify the
choice that best completes the statement or answers the question.
|
|
1.
|
if 5 > 10: print("fan") elif 8 !=
9: print("glass") else:
print("cream")
a. | fan | c. | cream | b. | glass | d. | True |
|
|
2.
|
What does the following code print?
sum = 14
if sum < 20
: print("Under ") else: print("Over
")
|
|
3.
|
What would be the starting value for the for loop?
for num
in range(25): print(num)
|
|
4.
|
Which of the following symbols in Python is used to mean “Not Equal
to”?
|
|
5.
|
What would be the increment value for the for loop?
for num
in range(25): print(num)
|
|
6.
|
What is the output of the following code?
while 4 = =
4: print(“4”)
a. | 4 is printed infinitely until the program closes | c. | 4 is printed
once | b. | Syntax error | d. | 4 is printed four times |
|