Python Quiz (More Loops)

Python Quiz (More Loops)

KG - 6th Grade

9 Qs

quiz-placeholder

Similar activities

Kiểm tra TX tin 8

Kiểm tra TX tin 8

8th Grade

10 Qs

JAVA IDENTIFIERS

JAVA IDENTIFIERS

6th - 8th Grade

14 Qs

WAN Sesi 1

WAN Sesi 1

1st Grade - University

10 Qs

REPARTO PROPORCIONAL

REPARTO PROPORCIONAL

1st - 3rd Grade

10 Qs

ukuran data

ukuran data

1st - 12th Grade

10 Qs

tmk pangkalan data

tmk pangkalan data

5th Grade

10 Qs

Hệ Điều Hành Của Máy Tính

Hệ Điều Hành Của Máy Tính

10th Grade - University

10 Qs

tin 10 l11

tin 10 l11

12th Grade

10 Qs

Python Quiz (More Loops)

Python Quiz (More Loops)

Assessment

Quiz

Computers

KG - 6th Grade

Practice Problem

Hard

Created by

Jerry Xiao

Used 28+ times

FREE Resource

AI

Enhance your content in a minute

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

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is the correct syntax of a while loop in Python

while condition:

ㅤㅤstatements

While condition:

ㅤ statements

while conditionㅤ

ㅤstatements

while condition: ㅤ

ㅤstatements;

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is a ‘condition-controlled’ loop?

for

while

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is a ‘count-controlled’ loop?

for

while

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is an incorrect ‘for’ loop?

for var in [1.2.3.4]:

for var in range(1):

for var in range(1,2,3):

for var in range(1,2,3,4,5):

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is an incorrect ‘for’ loop?

for var in range(5,1,-1):

for var in range(1,5,1):

for var in range(1,5,2):

for var in range(1,5,-1):

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following Python code?


for num in range(1, 2, 3):

print(num)

123

1 2 3

num

1

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following Python code?


for num in range(2):

print(num)

0 1

1 2

0 1 2

2

Access all questions and much more by creating a free account

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?