Search Header Logo

Quiz on Python While Loop

Authored by nguyentgvi Tuongvzi

Computers

10th Grade

Used 1+ times

Quiz on Python While Loop
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

100 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the Python programming language, which of the following syntax for a loop with an unknown number of iterations is correct?

while to

while to do

while do:

while :

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the Python programming language, when does a while loop end?

When the condition is false.

When the required number of loops is reached.

When the output is found.

When the condition is true.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the Python programming language, the loop structure with an unknown number of iterations is

while ;

while :

for in range(m,n):

for in range(m,n)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The statement for an unknown number of iterations is

for.

while.

if.

in.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the following statement, how much will the variable i increase by each iteration?

1.

2.

3.

4.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: x = 1 while (x <= 5): print("python") x = x + 1

5 times python.

4 times python.

3 times python.

No output.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: x = 1 while (x <= 5): print("python") x = x + 1

5 times python.

4 times python.

3 times python.

No output.

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?