Education Technology


Random PI

Updated on 07/13/2021

Activity Overview

What is the probability that two randomly selected integers (whole numbers) are co-prime? This is a really simple algorithm to write, the result however is very surprising! Divide 6 by the proportion, then take the square-root, what number remains? 

Objectives

The purpose of this activity is to help students become more independent programs and see the surprising link between co-prime numbers and PI, that transcendental number that just keeps popping up everywhere. 

Vocabulary

Mathematics Coding
  • Square-root
  • Proportion
  • Co-Prime
  • GCD or HCF
  • For / EndFor
  • If / Then
  • RandInt
  • Counter

About the Lesson

In this activity students use the GCD (Greatest Common Divisor or Highest Common Factor), Randint (Random Integer) a LOOP and IF THEN statement to write a simple program. There is less scaffolding in this activity, students are required to write their own program! The proportion of randomly selected integers that are co-prime has a very interesting result, believe it or not, it is related to PI.