</>
DICE ALGORITHMS </>
GRADE LEVELS MISSION
This activity is appropriate for students in grades 3-6. Use dice to relate the concept of a computer
algorithm.
VOCABULARY MATERIALS
ALGORITHM: Set of instructions designed to perform a » 1 die per player
specific task.
» Paper to make a score card
LOOP: Programming structure that repeats a sequence of » Pen or pencil
instructions until a specific condition is met.
PROGRAM: Collection of instructions that can be executed
by a computer to perform a specific task.
ABOUT THIS ACTIVITY
Computer programmers at INL use code to tell computers what to do.
Programmers write instructions, or code, which the computer then executes.
Computer programmers solve real-world problems by creating code that
will analyze the problem and provide solutions.
Almost every task we complete during the day requires a set of steps.
Whether it is making a peanut butter and jelly sandwich, brushing our teeth,
or feeding the dog, there are smaller steps that must be followed to finish
the task. Our brains are so smart that we can complete these steps without Photo credit: teachyourkidscode.com
even thinking about it. Computers don’t have a brain like we do. They have
to be told what to do. An algorithm is the thinking behind what needs to happen. Algorithms are essential to computer
science. Computer programmers combine the step-by-step algorithms into a program. A program is the instructions
given to the computer to complete the task.
In this activity, you will have the opportunity to use dice to relate the concept of a computer algorithm. Students will
experience the process that computer programmers go through when turning a step-by-step plan into a program. By
rolling dice, students will learn how to translate instructions into an algorithm and how that plays a role in programming.
DICE ALGORITHMS STEM.INL.GOV
DIRECTIONS
1 Make a chart to keep track of player scores:
PLAYER NAMES TURN 1 TURN 2 TURN 3 TURN 4 TOTAL
2 Series of Steps (Algorithm):
1. Give each a player one die. Every player will start their score at zero.
2. The youngest player will go first. They roll the die and write the number they roll next to their name.
3. Move clockwise, and the next player rolls their die and writes the number they
rolled next to their name.
REPEAT 3
4. Continue in a circle until everyone has completed one turn.
TIMES
5. Starting the second round, each player goes again and adds their new roll
to their old score.
6. Add up all the points. The person with most points WINS!
3 Look at this game from a computer’s point of view. If this game was played on a computer, it would need all of
the steps for this game programmed into an algorithm. When a player needs to roll the dice, the computer would
have to be told how to roll the dice. The computer would also have to be told to repeat steps, or loop, if going
through the same steps multiple times.
4 Now write down your own series of steps to create your own dice game. If you have steps that need to be
repeated, you can write in a loop. Give your game to a family member and see if they can play your game.
FURTHER
EXPLORATIONS
» Use different mathematical operations on each roll of the die.
» Roll a separate die to determine the mathematical operation. Example 1: Rolling even numbers add,
rolling odd numbers subtract. Example 2: Rolling 1 or 2 = add, 3 or 4 = subtract, 5 = multiply, 6 = divide.
Make up your own rules!
RESOURCES LEARN MORE Students + Parents + Educators
» Code.org CS Curricula For information on grants, training and student
https://curriculum.code.org/ opportunities, curriculum ideas, and other resources,
» Computer Programming - Loops please visit stem.inl.gov.
https://www.tutorialspoint.com/computer_
programming/computer_programming_loops.htm
DICE ALGORITHMS STEM.INL.GOV