Chapter Test - Module 14 (While Loop)

Chapter Test - Module 14 (While Loop)

7th Grade

14 Qs

quiz-placeholder

Similar activities

Test

Test

7th Grade

13 Qs

Pseudocode - Iteration

Pseudocode - Iteration

7th - 11th Grade

10 Qs

Code.org Express Course Vocab

Code.org Express Course Vocab

6th - 8th Grade

18 Qs

Coding Pre-Assessment

Coding Pre-Assessment

5th - 8th Grade

15 Qs

Scratch -if else

Scratch -if else

6th - 8th Grade

12 Qs

MicroBit Revision

MicroBit Revision

7th Grade

15 Qs

Hour of Code

Hour of Code

6th - 12th Grade

12 Qs

Nested If

Nested If

6th - 12th Grade

15 Qs

Chapter Test - Module 14 (While Loop)

Chapter Test - Module 14 (While Loop)

Assessment

Quiz

Computers

7th Grade

Medium

Created by

michael manalo

Used 3+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the purpose of a while loop in Python?

To execute a block of code once and then exit

To repeat a block of code a specific number of times

To execute a block of code as long as a condition is true

To iterate over a sequence of elements

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which keyword is used to exit a while loop prematurely?

Return

Pass

Continue

Break

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the purpose of the continue keyword in a while loop?

To exit the loop immediately

To repeat the loop from the beginning

To print a message and continue with the loop

To skip the rest of the code in the loop and start the next iteration

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which operator is used to compare two values in a while loop condition?

=

==

&&

**

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the purpose of the else clause in a while loop in Python?

To execute a block of code only if the loop condition is false

To execute a block of code only if the loop condition is true

To specify the loop condition

To exit the loop prematurely

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

With _____ we can execute a set of statements as long as a condition is true.

Else statement

Comparison Operator

While loop

For loop

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

With the _____ statement we can stop the loop even if the while condition is true.

Else

Pass

Break

Continue

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?