The Importance and Beauty of Mathematics

brought to Canadians at no cost by CanCodeToLearn.ca

The "Probabilities" Series


In the "Probabilities" series of activities you discover, invent, and test your mathematical theories.

These are a little more advanced, so please check out any suggested prerequisites. E.g., The Art of the Lynx, Create an Interactive Card, Interactive Story Project

Activity Cards & Guides

Students will create a computer simulation to test the probability of an event, in this case of two people in a class having the same birthday. This activity can be modified to demonstrate the probability of other events, such as the chance of rolling the same number on a die or on multiple dice.

Students will code the computer to:

  • Stamp a shape for each person’s birthday in a randomly determined location.

  • Create variables using sliders, and text boxes.

  • Create conditional statements to test conditions and control action.

Grades: 5 - 8

Time: maybe 3 60 minute sessions


Students will code an investigation to see how trial size impacts the probability of an event.

Students will code the computer to:

  • Randomly choose an event

  • Set the number of trials for an investigation

  • Keep track of how many times an event occurs

  • Create a graph using the data

Grades: 4 - 8

Time: maybe 3 60 minute sessions

Students will create a Calculator Program.

Students will code the computer to:

  • Retrieve input from the user via text boxes

  • Create variables and store values

  • Create an interactive button

  • Perform operations on numbers entered by the user

  • Animate a shape using Repeat

  • Hide and show text boxes

  • Advanced options include:

  • Incorporating additional buttons and operations

  • Try coding other applications that require the same skills

Grades: 6 - 8

Time: maybe 3 60 minute sessions

Students will create a gravity simulation.

This activity will allow the students to demonstrate how a object is affected by gravity and rolls down an incline plane or hill.

For this simulation and animation the students will use a ball to show what this might look like.

Students will code the computer to:

  • Locate objects using coordinates

  • Create backgrounds

  • Direct actions based on compass headings

  • Write procedures

  • Use buttons to trigger actions

  • Animate an object to simulate movement

  • Add a slider to create variables

  • Advanced options include:

    • Using more complex inclined plane

Grades: 3 - 8

Time: maybe 5 60 minute sessions

While creating this simulation, students explore math concepts such as randomness and its connection to probability.

This project introduces a number of more advanced coding concepts such as conditional statements and logic operators, variables, and additional applications of event handlers.