<
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? for i in range(5): if i%2!=0: print(i)?
1 3
0 2 4
1 3 5
// question 2 of 10
What is printed? for i in range(3): if i==1: pass print(i)?
1
0 1 2
0 2
// question 3 of 10
What does range(5) generate?
Only 5
0 to 4
1 to 5
// question 4 of 10
What is printed? x=0 while x<3: print(""Hi"") x+=1?
Hi 3 times
Hi once
Infinite loop
// question 5 of 10
What is printed? for i in range(3): print(""#""*i)?
### ## #
0 1 2
blank # ##
// question 6 of 10
What is printed? while 1<2: break?
Nothing
Error
True
// question 7 of 10
What is printed? if True: print(""A"")?
A
Nothing
Error
// question 8 of 10
What happens after break?
Loop stops
Loop repeats
Program crashes
// question 9 of 10
What is printed? for i in range(5): if i==3: continue else: print(i)?
0 1 2 3 4
3
0 1 2 4
// question 10 of 10
What is printed? for i in range(2): for j in range(3): print(j)?
0 1 2 once
1 2 3 twice
0 1 2 twice
Submit Answers →