
Pyhton-Loops

Quiz
•
Computers
•
9th Grade
•
Medium
Zubaidah Shaheen
Used 6+ times
FREE Resource
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many lines will this program print?
while True:
print("hi")
0
1
an infinite number of lines
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many lines will this program print?
x = 10
while x > 0:
print(x)
x = x - 3
3
4
5
6
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes the purpose of a for loop?
A for loop is for doing something an indeterminate number of times.
A for loop is doing something an infinite number of times.
A for loop is for doing something a fixed number of times.
A for loop is for doing something three times.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following programs prints ten lines?
for i in range(10): print("hi")
for i = 1 to 10: print("hi")
for i in 1 - 10: print("hi")
for i from 0 to 9: print("hi")
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If I am using the following condition in my program:
while True:
which keyword should I use to make sure I don’t create an infinite loop?
break
continue
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which Python keyword skips back to the beginning of a loop?
break
continue
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following does not properly nest control structures?
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Functions

Quiz
•
9th - 12th Grade
20 questions
Programming Constructs

Quiz
•
9th - 10th Grade
24 questions
Python 7. Arrays and Strings

Quiz
•
9th Grade
25 questions
Introduction to Python

Quiz
•
KG - University
20 questions
Functions With Parameters and Returns

Quiz
•
9th - 12th Grade
19 questions
AQA GCSE Computer Science - 3.1.1 Representing Algorithms

Quiz
•
8th - 10th Grade
20 questions
ASK T2 - Kod Arahan (Python)

Quiz
•
7th Grade - University
20 questions
Python First Steps Homework Quiz

Quiz
•
7th - 9th Grade
Popular Resources on Wayground
10 questions
Video Games

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

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade