WorksheetsCoding Review
Total questions: 24
Worksheet time: 24mins
Which of the following is an example of an algorithm?
the weight of a package of macaroni and cheese in ounces
directions for heating a package of macaroni and cheese in three steps
a description of the ingredients of macaroni and cheese
the cost of a package of macaroni and cheese in dollars
Writing an algorithm is most useful for a task that
will need to be completed only once
will need creativity to complete
will need continued research to complete
will need to be completed many times.
Which of the following tasks would you most likely use an algorithm to complete?
convincing your neighbors to come with you to the pool
imagining a new way to jump off the diving board that no one has done before
following directions from your neighborhood to the swimming pool
winning a treading water contest by reading water without getting tired
When you're using an algorithm to solve a problem, you are
following steps exactly as they are written.
coming up with a unique solution that works sometimes.
make a solution more efficient
making an inference using your prior knowledge.
Which algorithm for baking a five-layer chocolate cake would be the most efficient?
one that produces the most delicious cake
one that takes the least amount of time
one that can be used to bake a four - or three - layer cake
one that requires the most ingredients
Which algorithm would direct the turtle to the purple dot?
- move (5)
- turn (left)
- move (1)
- move (3)
- turn (left)
- move (4)
- move (1)
- turn (left)
- move (4)
- move (3)
- turn (left)
- move (2)
Which algorithm would direct the turtle to the finish?
- move (5)
- turn (right)
- move (2)
- turn (right)
- move (3)
- move (3)
- turn (left)
- move (2)
- turn (right)
- move (3)
- move (5)
- turn (left)
- move (2)
- turn (left)
- move (2)
- turn (right)
- move (2)
- move (5)
- turn (left)
- move (2)
- turn (right)
- move (2)
- turn (right)
- move (2)
Which of these describes an event in coding?
a soccer game
looking at a photo on your phone
clicking the arrow on the keyboard to make a page scroll down
Python, a language that can be used to write directions for a computer to follow
Which of the following is most likely an event?
taking a walk
clicking "play" on a video
reading a Facebook post
putting your cell phone in your pocket
An event handler says, "when x pressed, fish does a flip." What is the event?
the programmer writing an event handler
the user pressing the x key
the user clicking the fist
the fish doing a flip
An event handler says, "when x pressed, fish does a flip." What does the program show when the user presses the x key?
the fish doing a flip
the fish staying still
an x on the screen
the event handler
Complete the sentence with the best option below.
In coding, loops are used to
tell a program to do different things depending on what is true.
tell a program to stop running
repeat actions.
delete old code
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).
0
1
50
100
Complete the sentence with the best option below.
A programmer could use a loop to repeat code ______times.
45
1,000
17,000
all of the above
Read each scenario. In which would a loop be most helpful?
Cory is programming a robot to wash 50 dishes.
Maritza is writing a program that will automatically take one photo.
Radiya wants a program to display a different message depending on who logs into it.
Elna is writing a program that will draw one clown.
What is a conditional statement?
a statement that runs no matter what is true
a statement that only runs when certain criteria are met
a statement that's only found in the code for games
a statement that's only found in one coding language
Conditional statements tell computers to check if a condition is ______
big or small
left or right
true or false
tall or short
What is the name for the part of the program that could be carried out if the if condition turns out to be false?
the "else"
the "actually"
the "otherwise"
the "instead"
What will a computer do if the if condition turns out to be true?
move on to the else
carry out a specific action
move on to the else if
check again to see if the condition is false
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"?
else if
else after
instead
otherwise
If your conditional statement has an if, an else if and an else, how many different outcomes can happen?
0
1
2
3
What will a program do if both the if and else if conditions turn out to be false?
go back and check the if condition again
check the else if condition again
move on to the else
delete the if condition
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?
your grandma telling your dad that you didn't help
you telling your dad that you didn't help
you buying ice cream
you helping your grandma fix your television
What is the name for the set of steps a computer is given to follow?
a format
algorithm
animation
a language
