<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
Enlist
// guest
▾
Login
Request Account
[ light ]
// Control Flow
Control Flow Quiz
// question 1 of 10
What is printed? while False: break?
False
Nothing
Error
// question 2 of 10
What does break do?
Skips iteration
Stops the loop
Does nothing
// question 3 of 10
What is printed? for i in range(4): print(i>1)?
False True True True
False False True True
True True False False
// question 4 of 10
What is printed? if True and False: print(""A"")?
A
Nothing
Error
// question 5 of 10
What is printed? for i in range(5): if i%2==0: print(i)?
0 2 4
0 1 2 3 4
1 3 5
// question 6 of 10
What does the variable i represent in a for loop?
Current value
A boolean
Total iterations
// question 7 of 10
What is printed? for i in range(5): if i == 2: break print(i)?
2
0 1
0 1 2 3 4
// question 8 of 10
What is a nested loop?
An if inside while
A print inside loop
A loop inside another loop
// question 9 of 10
What is printed? if 2 <= 1: print(""OK"")?
Error
Nothing
OK
// question 10 of 10
What does == do?
Assigns values
Adds values
Compares values
Submit Answers →