wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Iteration and Complex Control

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

What does the while loop do in programming?

a)

Executes a block of code once.

b)

Executes a block of code repeatedly as long as a condition is true.

c)

Executes a block of code based on user input.

d)

Executes a block of code at a specific time.

2.

Which loops are examples of iteration control structure?

a)

For and while loops

b)

Do and repeat loops

c)

If and else loops

d)

Switch and case loops

3.

What types of control structures work together in robotics?

a)

Sequential, conditional, and iterative

b)

Random, manual, and automatic

c)

Visual, auditory, and tactile

d)

Static, dynamic, and flexible

4.

What is a conditional control structure used for when building a robot?

a)

To make it faster

b)

To allow it to react to changes

c)

To make it quieter

d)

To reduce its size

5.

What is the benefit of using combined control structures in robots? (Sequential + Conditional + Iteration)

a)

To make them more colorful

b)

To enable complex behaviors

c)

To make them louder

d)

To make them smaller

6.

Which kind of loop would be used?


I need a guessing game program that will let me keep guessing until I get the right answer.

a)

FOR Loop

b)

WHILE Loop

7.

The action of doing something over and over again

a)

Program

b)

Function

c)

Variable

d)

Loop

8.

A while loop is used to:

a)

Execute code until a condition is met

b)

Wait a specified length of time

c)

Ensure that the battery has enough power for an operation

d)

Check an input repeatedly

9.

Which control structure is best suited for executing a block of code a specific number of times?

a)

While loop

b)

Switch case

c)

If-else statement

d)

For loop

10.

Scooping cookie dough until it is all used up is an example of a:

a)

For Loop

b)

While Loop

c)

Conditional Control

d)

Sequential Control

11.

Giving each student in the room a piece of candy is an example of a:

a)

For Loop

b)

While Loop

c)

Sequential Structure

d)

Conditional Structure

12.

Our countdown timer uses what kind of a loop?

a)

For Loop

b)

Forever Loop

c)

While Loop

d)

And Loop

13.

The farmer uses what kind of a loop to fill holes?

a)

While Loop

b)

For Loop

c)

And Loop

d)

Forever Loop

14.

Which loop is most suitable for iterating over a collection of items?

a)

While Loop

b)

For Loop

c)

Do-While Loop

d)

Infinite Loop

15.

What is the primary purpose of a loop in programming?

a)

To execute a block of code based on user input

b)

To execute a block of code multiple times

c)

To execute a block of code once

d)

To execute a block of code at a specific time

16.

In programming, which control structure allows for decision-making based on conditions?

a)

Iterative

b)

Sequential

c)

Conditional

d)

Loop

17.

Filling a water balloon until you run out of balloons could be an example of a:

a)

For loop

b)

While loop

18.

Jogging around the track 5 times could be considered an example of a:

a)

For loop

b)

While Loop

19.

Reading a book until you have read the last page is an example of a:

a)

For loop

b)

While loop

20.

Wrapping gifts for each member of the family is an example of a:

a)

For loop

b)

While loop