Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Coding Review

Total questions: 24

Worksheet time: 24mins

Name
Class
Date
1.

Which of the following is an example of an algorithm?

a)

the weight of a package of macaroni and cheese in ounces

b)

directions for heating a package of macaroni and cheese in three steps

c)

a description of the ingredients of macaroni and cheese

d)

the cost of a package of macaroni and cheese in dollars

2.

Writing an algorithm is most useful for a task that

a)

will need to be completed only once

b)

will need creativity to complete

c)

will need continued research to complete

d)

will need to be completed many times.

3.

Which of the following tasks would you most likely use an algorithm to complete?

a)

convincing your neighbors to come with you to the pool

b)

imagining a new way to jump off the diving board that no one has done before

c)

following directions from your neighborhood to the swimming pool

d)

winning a treading water contest by reading water without getting tired

4.

When you're using an algorithm to solve a problem, you are

a)

following steps exactly as they are written.

b)

coming up with a unique solution that works sometimes.

c)

make a solution more efficient

d)

making an inference using your prior knowledge.

5.

Which algorithm for baking a five-layer chocolate cake would be the most efficient?

a)

one that produces the most delicious cake

b)

one that takes the least amount of time

c)

one that can be used to bake a four - or three - layer cake

d)

one that requires the most ingredients

6.

Which algorithm would direct the turtle to the purple dot?

a)
  1. move (5)
  2. turn (left)
  3. move (1)
b)
  1. move (3)
  2. turn (left)
  3. move (4)
c)
  1. move (1)
  2. turn (left)
  3. move (4)
d)
  1. move (3)
  2. turn (left)
  3. move (2)
7.

Which algorithm would direct the turtle to the finish?

a)
  1. move (5)
  2. turn (right)
  3. move (2)
  4. turn (right)
  5. move (3)
b)
  1. move (3)
  2. turn (left)
  3. move (2)
  4. turn (right)
  5. move (3)
c)
  1. move (5)
  2. turn (left)
  3. move (2)
  4. turn (left)
  5. move (2)
  6. turn (right)
  7. move (2)
d)
  1. move (5)
  2. turn (left)
  3. move (2)
  4. turn (right)
  5. move (2)
  6. turn (right)
  7. move (2)
8.

Which of these describes an event in coding?

a)

a soccer game

b)

looking at a photo on your phone

c)

clicking the arrow on the keyboard to make a page scroll down

d)

Python, a language that can be used to write directions for a computer to follow

9.

Which of the following is most likely an event?

a)

taking a walk

b)

clicking "play" on a video

c)

reading a Facebook post

d)

putting your cell phone in your pocket

10.

An event handler says, "when x pressed, fish does a flip." What is the event?

a)

the programmer writing an event handler

b)

the user pressing the x key

c)

the user clicking the fist

d)

the fish doing a flip

11.

An event handler says, "when x pressed, fish does a flip." What does the program show when the user presses the x key?

a)

the fish doing a flip

b)

the fish staying still

c)

an x on the screen

d)

the event handler

12.

Complete the sentence with the best option below.

In coding, loops are used to

a)

tell a program to do different things depending on what is true.

b)

tell a program to stop running

c)

repeat actions.

d)

delete old code

13.

The robot in the video is programmed to make 100 burritos using a loop. To do this, the robot runs the code in the loop _______ time(s).

a)

0

b)

1

c)

50

d)

100

14.

Complete the sentence with the best option below.

A programmer could use a loop to repeat code ______times.

a)

45

b)

1,000

c)

17,000

d)

all of the above

15.

Read each scenario. In which would a loop be most helpful?

a)

Cory is programming a robot to wash 50 dishes.

b)

Maritza is writing a program that will automatically take one photo.

c)

Radiya wants a program to display a different message depending on who logs into it.

d)

Elna is writing a program that will draw one clown.

16.

What is a conditional statement?

a)

a statement that runs no matter what is true

b)

a statement that only runs when certain criteria are met

c)

a statement that's only found in the code for games

d)

a statement that's only found in one coding language

17.

Conditional statements tell computers to check if a condition is ______

a)

big or small

b)

left or right

c)

true or false

d)

tall or short

18.

What is the name for the part of the program that could be carried out if the if condition turns out to be false?

a)

the "else"

b)

the "actually"

c)

the "otherwise"

d)

the "instead"

19.

What will a computer do if the if condition turns out to be true?

a)

move on to the else

b)

carry out a specific action

c)

move on to the else if

d)

check again to see if the condition is false

20.

If the if condition turns out to be false, what is the name of the condition that the program could check before moving onto the "else"?

a)

else if

b)

else after

c)

instead

d)

otherwise

21.

If your conditional statement has an if, an else if and an else, how many different outcomes can happen?

a)

0

b)

1

c)

2

d)

3

22.

What will a program do if both the if and else if conditions turn out to be false?

a)

go back and check the if condition again

b)

check the else if condition again

c)

move on to the else

d)

delete the if condition

23.

Your grandma says "if you help me fix my television, I'll buy you some ice cream. Or else, I'll tell your dad you didn't help." What is the condition that must be true in order for your grandma to buy you ice cream?

a)

your grandma telling your dad that you didn't help

b)

you telling your dad that you didn't help

c)

you buying ice cream

d)

you helping your grandma fix your television

24.

What is the name for the set of steps a computer is given to follow?

a)

a format

b)

algorithm

c)

animation

d)

a language