
loops
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Medium
KEERTHI BADUGU
Used 5+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q1. What is the main purpose of the break statement in Python?
A. Skips the current iteration
B. Stops the loop entirely
C. Restarts the loop
D. Ignores the loop condition
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q2. What is the main purpose of the continue statement in Python?
A. Ends the program
B. Skips the current iteration and moves to the next
C. Stops the loop entirely
D. Starts the loop again from the beginning
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q3. What will be the output?
for i in range(5):
if i == 2:
break
print(i)
A. 0 1
B. 0 1 2
C. 2 3 4
D. 0 1 2 3 4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q4. What will be the output?
for i in range(5):
if i == 2:
continue
print(i)
A. 0 1 3 4
B. 0 1 2 3 4
C. 2 3 4
D. 0 1 2 4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q5. Which of the following loops can use break and continue?
A. for loop only
B. while loop only
C. Both for and while loops
D. Only nested loops
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q6. What will the following code print?
i = 1
while i <= 5:
if i == 3:
break
print(i) i += 1
A. 1 2 3
B. 1 2
C. 3 4 5
D. 1 2 4 5
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q7. What will the following code print?
i = 1
while i <= 5:
i += 1
if i == 3:
continue
print(i)
A. 1 2 4 5 6
B. 2 4 5 6
C. 3 4 5
D. 1 3 5
Create a free account and access millions of resources
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?
Similar Resources on Wayground
14 questions
Day 1 - Basics of Java
Quiz
•
Professional Development
20 questions
Mobile Apps PayKu
Quiz
•
1st Grade - Professio...
11 questions
L7 - Bài 14 TT Tuần tự
Quiz
•
Professional Development
10 questions
AWS Practitioner - 10
Quiz
•
Professional Development
20 questions
Linux 1 - Introduction
Quiz
•
Professional Development
10 questions
INFORMÁTICA- PROVA 1- Todas as Trilhas
Quiz
•
Professional Development
12 questions
Cycle 4: Session 8 Review.
Quiz
•
Professional Development
10 questions
ABC
Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
