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
25 questions
Algorithms - python (GCSE)

Quiz
•
10th - 12th Grade
20 questions
Programming

Quiz
•
9th - 11th Grade
21 questions
CodeHS 3.1 Boolean Expressions-4.2 For Loops Review

Quiz
•
9th - 12th Grade
27 questions
Intro to Microbit

Quiz
•
9th - 12th Grade
20 questions
Remidial Pemrograman Web

Quiz
•
11th Grade
20 questions
Test Formatif Informatika Kelas 11

Quiz
•
11th Grade
20 questions
Java For Loop basic syntax

Quiz
•
9th - 12th Grade
21 questions
Python Strings

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade