Algorithm

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Algorithm

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which best describes an algorithm?
A A set of clear steps, in order, that completes a task
B A random list of ideas about a task
2. Which one is an example of an algorithm?
A A photo of a piece of toast
B A recipe for making toast, with each step in order
3. True or false: Your morning routine can be an algorithm.
A False: only computers can use algorithms
B True: wake up, brush teeth, get dressed, eat breakfast
4. Which set of steps is in the right order for an algorithm to make a sandwich?
A Get bread, add filling, put the bread together
B Put the bread together, get bread, add filling
5. Which step is precise enough for a computer to follow?
A Move forward 3 steps
B Go over there somewhere

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
11. Get bread 2. Add peanut butter 3. Close sandwich AThe steps are vague. 'Make it good' and 'Do the thing' do not say exactly what to do.
2Move forward 3 steps BThe steps are in the wrong order. You cannot eat the cake before you mix and bake it.
3A morning routine is an algorithm for a person because it lists steps in order C1. Wake up 2. Brush teeth 3. Get dressed 4. Eat breakfast
4An algorithm for a computer must be precise, with no guessing needed DA precise step that a person or computer can follow exactly
51. Eat the cake 2. Mix the batter 3. Bake the cake ESet score to 0 Add 1 to score
61. Make it good 2. Do the thing FA recipe written as numbered steps in order is an algorithm

Definitions

algorithm

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
An _________ is a set of clear steps.
2.
1. Get two slices of bread _. Spread butter on the bread 3. Put the bread in the toaster
3.
Each step must be _______ and clear.
4.
A recipe lists _____ to follow in order.
5.
Computers and ______ can follow algorithms.

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A 1. Get bread from the bag
B 2. Put bread in the toaster
C 3. Spread butter on the toast
D 4. Take out the toast
Question 2
A 1. Get a bowl
B 2. Add some stuff to the bowl
C 3. Add half a cup of milk
Question 3
A 1. Ask for the first number
B 2. Ask for the first number again
C 3. Add the two numbers
D 4. Show the answer
Question 4
A 1. Wet your toothbrush
B 2. Put toothpaste on brush
C 3. Brush for a while
D 4. Rinse your mouth
Question 5
A 1. Empty the watering can
B 2. Carry it to the plant
C 3. Pour water on the soil

Answer Key

Algorithm
Section A: Quick Questions
Q1
A — A set of clear steps, in order, that completes a task
Q2
B — A recipe for making toast, with each step in order
Q3
B — True: wake up, brush teeth, get dressed, eat breakfast
Q4
A — Get bread, add filling, put the bread together
Q5
A — Move forward 3 steps
Section B: Match the Pairs
Q1
1. Get bread 2. Add peanut butter 3. Close sandwich → A recipe written as numbered steps in order is an algorithm
Q2
Move forward 3 steps → A precise step that a person or computer can follow exactly
Q3
A morning routine is an algorithm for a person because it lists steps in order → 1. Wake up 2. Brush teeth 3. Get dressed 4. Eat breakfast
Q4
An algorithm for a computer must be precise, with no guessing needed → Set score to 0 Add 1 to score
Q5
1. Eat the cake 2. Mix the batter 3. Bake the cake → The steps are in the wrong order. You cannot eat the cake before you mix and bake it.
Q6
1. Make it good 2. Do the thing → The steps are vague. 'Make it good' and 'Do the thing' do not say exactly what to do.
Section C: Definitions
Q1
algorithm — A set of clear steps, in order, that solves a problem or completes a task, like a recipe or morning routine. Each step must be precise so a person or computer can follow it.
Section D: Fill in the Blanks
Q1
An algorithm is a set of clear steps.
Q2
1. Get two slices of bread 2. Spread butter on the bread 3. Put the bread in the toaster
Q3
Each step must be precise and clear.
Q4
A recipe lists steps to follow in order.
Q5
Computers and people can follow algorithms.
Section E: Spot the Error
Q1
C — The steps are out of order. The toast is not made yet, so step 3 should be 'Push the lever down'. Buttering comes after the toast pops up.
Q2
B — 'Some stuff' is not precise. Nobody can tell what to add or how much. It should say exactly what to do, like 'Pour 1 cup of cereal in bowl'.
Q3
B — Step 2 asks for the first number twice, so the computer never gets a second number to add. It should be 'Ask for the second number'.
Q4
C — 'A while' is not precise because people would brush for different times. A clear step gives an exact time: 'Brush for two minutes'.
Q5
A — There would be no water left to pour in step 3. The first step must be 'Fill the watering can' so the steps work in order.