
Mastering Python Loops
Authored by Harmeet Kaur
Computers
11th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output?
6
3
2
0
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does this print?
1, 4, 7,
1, 2, 3,
3, 6, 9,
1, 3, 5, 7, 9,
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following results in an infinite loop?
for i in range(10):
for i in [1, 2, 3]:
for i in iter(int, 1):
for i in range(5, 1):
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does this code output?
1-3-5-
1-3-
0-2-4-
0-1-2-3-4-
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output?
3 4 5 6 7
3 4 5 6
3 4 5
3 4 5 6 7 8
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does this code print?
l o o p
ll oo oo pp
looploop
loopp
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which is equivalent to for i in range(len(arr)):?
for i in arr:
for i in range(arr):
for i in enumerate(arr):
for i in arr.items():
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?