Mastering Python Loops

Quiz
•
Computers
•
11th Grade
•
Hard
Harmeet Kaur
Used 2+ times
FREE Resource
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():
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
iGCSE Computer Science: Problem Solving

Quiz
•
9th - 12th Grade
20 questions
Basic Python

Quiz
•
10th - 12th Grade
20 questions
Control Statements in Python

Quiz
•
11th Grade
20 questions
Python - lists,loops,basics

Quiz
•
9th - 11th Grade
20 questions
Python Basics Review (TSK)

Quiz
•
9th - 12th Grade
20 questions
Intro to coding arduino unit

Quiz
•
9th - 12th Grade
20 questions
Chapter 2: Nested Loops

Quiz
•
11th Grade
20 questions
Python -Iteration (loops)

Quiz
•
7th - 12th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade