Quiz on Python While Loop

Quiz on Python While Loop

10th Grade

100 Qs

quiz-placeholder

Similar activities

End of Year 10 Quiz

End of Year 10 Quiz

10th Grade

100 Qs

Midterm-  January - 2023

Midterm- January - 2023

9th - 12th Grade

100 Qs

Review for Python 3 Test - Loops and Strings (CodeCademy)

Review for Python 3 Test - Loops and Strings (CodeCademy)

7th - 12th Grade

100 Qs

OCR Paper 2 Revision

OCR Paper 2 Revision

9th - 11th Grade

100 Qs

Python 101 Quiz - 101 Questions

Python 101 Quiz - 101 Questions

5th - 12th Grade

101 Qs

Y10 Computer Science Mock 2021

Y10 Computer Science Mock 2021

9th - 10th Grade

100 Qs

Excel/Access EOC Review

Excel/Access EOC Review

9th Grade - University

100 Qs

Computer Science Review

Computer Science Review

9th - 10th Grade

100 Qs

Quiz on Python While Loop

Quiz on Python While Loop

Assessment

Quiz

Computers

10th Grade

Hard

Created by

nguyentgvi Tuongvzi

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?