Search Header Logo

CP M4 Repetition & Loops

Authored by Marcia Bernas

Computers

9th - 12th Grade

Used 12+ times

CP M4 Repetition & Loops
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

A __________________ is a collection of commands that are given a name.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False. Every WHILE loop can be replaced with FOR loop.

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Variable used to end the loop

Loop control variable

count variable

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

While loops should always be:

output

indented

calculated

input

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

For a loop to stop, the loop control variable must ________________.

change

be input from the keyboard

be true

change inside the loop

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is wrong with:

x = 1

while (x < 20):

print (x)

There is no x = 0 before the loop

The loop will not stop since the condition is wrong

x should be c

The loop will not stop since x never changes

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we use loops?

Because computers can do calculations humans can't.

Because programming is an important skill

Because of efficiency.

Because programs need to make decisions.

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?