Python Quiz (More Loops)

Python Quiz (More Loops)

KG - 6th Grade

9 Qs

quiz-placeholder

Similar activities

Bài 7: Làm quen với Internet - lớp 3

Bài 7: Làm quen với Internet - lớp 3

3rd Grade

10 Qs

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

Class 1E L-6,7,8

Class 1E L-6,7,8

1st Grade

12 Qs

Latihan TIK bab 4 Kelas 1

Latihan TIK bab 4 Kelas 1

1st Grade

10 Qs

SO-750

SO-750

University

10 Qs

Ayo Belajar Agile

Ayo Belajar Agile

9th - 12th Grade

10 Qs

WORD ĐỀ 6

WORD ĐỀ 6

University

10 Qs

"LA LEY DE MOISES Y LA LEY DE CRISTO" CAP 5-6

"LA LEY DE MOISES Y LA LEY DE CRISTO" CAP 5-6

University

14 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?