wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Programming Structures and Control

Total questions: 22

Worksheet time: 11mins

Name
Class
Date
1.

Which programming concept involves breaking down tasks into step-by-step instructions?

a)

Compilation

b)

Debugging

c)

Algorithm

d)

Encryption

2.

What is an algorithm?

a)

A programming language

b)

A set of instructions to solve a problem

c)

A type of hardware

d)

A software application

3.

What type of control structure is like following a recipe step by step?

a)

Sequential

b)

Conditional

c)

Iteration

d)

Exponential

4.

What programming structure is used to write conditional statements for robots?

a)

Loops

b)

If/else statements

c)

Variables

d)

Functions

5.

What type of control structure is used when a robot makes decisions based on inputs?

a)

Sequential

b)

Conditional

c)

Iteration

d)

None of the above

6.

What is an example of a sequential control structure?

a)

Turning right if there's a wall

b)

Moving forward, then turning right, then moving forward again (without sensor input)

c)

Detecting obstacles with sensors

d)

Using if/else statements

7.

Which of the following is NOT a type of control structure?

a)

Sequential

b)

Iteration

c)

Parallel

d)

Conditional

8.

What is the primary function of control structures in programming?

a)

To store data

b)

To control the flow of a program

c)

To display output

d)

To debug code

9.

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

10.

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

11.

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

12.

What does the while loop do in programming?

a)

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

b)

Executes a block of code once.

c)

Executes a block of code based on user input.

d)

Executes a block of code at a specific time.

13.

What type of control structure is used to react to changes in the environment?

a)

Conditional

b)

Sequential

c)

Iteration

d)

Forever Loop

14.

When constructing a bridge truss a triangle is generally a stronger shape than a rectangle.

a)

True

b)

False

15.

An ______ is the information that a robot receives from its environment, often through sensors, to make decisions and respond appropriately.

a)

input

b)

output

c)

process

d)

feedback

16.

An ______ is a robot’s action or response (such as moving, speaking, or manipulating an object) after processing inputs according to the instructions defined in the program.

a)

output

b)

input

c)

sensor

d)

program

17.

In a sequential control structure, how are the steps executed?

a)

Randomly

b)

Simultaneously

c)

One after the other in order

d)

Based on user input

18.

What is the role of a sensor in a robot?

a)

To display output

b)

To store data

c)

To execute commands

d)

To provide input from the environment

19.

Which of the following is an example of an iterative control structure?

a)

Function call

b)

If/else statement

c)

For loop

d)

Switch case

20.

Which control structure is used to repeat a block of code a specific number of times?

a)

Recursive

b)

Sequential

c)

Iteration

d)

Conditional

21.

What is the purpose of a conditional control structure in programming?

a)

To terminate a program

b)

To store data

c)

To repeat code indefinitely

d)

To execute code based on a condition

22.

What is the role of a variable in programming?

a)

To execute code

b)

To store data values

c)

To define functions

d)

To create loops