
Chapter Test - Module 14 (While Loop)
Authored by michael manalo
Computers
7th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the purpose of a while loop in Python?
To execute a block of code once and then exit
To repeat a block of code a specific number of times
To execute a block of code as long as a condition is true
To iterate over a sequence of elements
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which keyword is used to exit a while loop prematurely?
Return
Pass
Continue
Break
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the purpose of the continue keyword in a while loop?
To exit the loop immediately
To repeat the loop from the beginning
To print a message and continue with the loop
To skip the rest of the code in the loop and start the next iteration
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which operator is used to compare two values in a while loop condition?
=
==
&&
**
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the purpose of the else clause in a while loop in Python?
To execute a block of code only if the loop condition is false
To execute a block of code only if the loop condition is true
To specify the loop condition
To exit the loop prematurely
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
With _____ we can execute a set of statements as long as a condition is true.
Else statement
Comparison Operator
While loop
For loop
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
With the _____ statement we can stop the loop even if the while condition is true.
Else
Pass
Break
Continue
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?