Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Loops - code.org

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

What type of loop is this?

a)

a variable loop

b)

a for loop

c)

a while loop

2.

What type of loop is this?

a)

a while loop

b)

a for loop

c)

a variable loop

3.

What is a repetitive portion of an algorithm that repeats a specific number of times or until a given condition is met?

a)

iteration

b)

variable

c)

list

4.
  • What occurs when the ending condition will never evaluate to true?

a)

a list

b)

a variable

c)

an infinite loop

5.

What letter do computer scientists use to mean a variable in programming?

a)

an x

b)

a y

c)

an i

6.

What does steps ++ mean?

a)

steps + a variable

b)

steps + 1

c)

steps = 1

d)

steps + 11

7.

What allows us to test solutions or run experiments in a way that is usually cheaper, safer, and often times faster?

a)

a simulation

b)

a trial

c)

an experiment

8.

What will show up in the console log when this program is run?

a)

0 1 2 3 4

b)

1 2 3

c)

1 2 3 4

d)

0 1 2 3

9.

A job placement agency helps match job seekers with potential employers. The agency would like to design a simulation in order to help predict the likely job placement outcomes for job seekers based on historical trends and patterns. Which of the following is most likely to be a benefit of the simulation?

a)

The computer simulation will be able to include more details and complexity than the real-world job placement process.

b)

The computer simulation could test hypotheses about patterns in the job placement process that are costly or time consuming to observe in reality.

c)

The computer simulation will be able to precisely predict the real-world outcomes for each job seeker.

10.

Which of the following is the same loop just written differently? There are two answers.

a)

b)

c)

for the variable i, while i is less than 4, add one to the variable and move forward once

d)

for the variable i, if i is greater than 4, move forward 4 times and add one to the variable