loops

loops

Professional Development

15 Qs

quiz-placeholder

Similar activities

pemahaman tentang quizizz

pemahaman tentang quizizz

Professional Development

10 Qs

Vấn đề Môi trường 02

Vấn đề Môi trường 02

Professional Development

20 Qs

Scratch

Scratch

KG - Professional Development

10 Qs

E-Commerce

E-Commerce

University - Professional Development

16 Qs

Java Fundamentals

Java Fundamentals

Professional Development

20 Qs

Bài 19. Tạo và làm việc với bảng

Bài 19. Tạo và làm việc với bảng

Professional Development

10 Qs

Mobile Technology

Mobile Technology

Professional Development

10 Qs

python quiz

python quiz

6th Grade - Professional Development

10 Qs

loops

loops

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

KEERTHI BADUGU

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?