MATH + CODING WORKSHOP 5-6

(c) George Gadanidis, 2021

Designed to serve as a base lesson plan for diverse learning settings (f2f, hybrid, online, parents/children).

Although designed with the Ontario 5-6 math curriculum in mind, this workshop would be of value to all educators interested in learning how to integrate math + coding.

Based on Understanding Math + Coding, 1-9.

WORKSHOP OVERVIEW

A. WHAT IS INEQUALITY?

Where is inequality all around us?

B. WHAT IS AN “INEQUALITY” IN MATH?

PUZZLE #1

I am thinking of a number on the number line.

  • The number I am thinking of is greater than 3.
  • What are the possible values of my number?

INEQUALITY

x > 3 is an inequality.

x > 3 is read as “x is greater than 3“.

If x > 3, then x could be one of the numbers in the set {4, 5, 6, 7 …}.

We can show this on a number line:

Notice the arrow after the number 7, indicating that the dot pattern continues.

PUZZLE #2

Which of the following are equivalent to one another?

a)

x + 2 > 5

b)

x > 3

c)

2x > 6

d)

-2x > -6

C. WHAT IS A CONDITIONAL STATEMENT?

DO I NEED AN UMBRELLA OR SNOW BOOTS?

You know how to dress to match the weather outside because you use conditional thinking.

  • If it is raining, then:
    • take an umbrella
  • If it is snowing, then:
    • wear boots

MAKING COMPUTERS “THINK”

If you wanted a computer to print numbers that are greater than 3, you could say:

  • print (4)
  • print (5)
  • print (6)
  • print (7)
  • … and so on

Or you can use a conditional statement, to create more efficient code, and to get the computer to do more thinking:

What this looks like as a Python computer code, for numbers 1-10:

You can enter and run this code at https://cscircles.cemc.uwaterloo.ca/console.

D. INEQUALITIES in 1D, 2D and 3D

How do we represent a solution to an inequality like x > 3?

  • We can list the numbers that make the inequality true as a set: {4, 5, 6, 7, 8, 9 …}
  • We can plot the numbers that make on a number line:

These solutions assume a one-dimensional (1D) setting.

What if we assume a two-dimensional (2D) setting, like the flat surface of a floor?

Or in our 3-dimensional (3D) setting, like a classroom?

Asking “what if” is what mathematicians and scientists do. It engages their imagination and curiosity. It helps them discover new ideas and make progress in their field.

Asking “what if” is also what students do. It engages their imagination, curiosity and attention. It helps them make conceptual connections and understand new ideas.

ON A NUMBER LINE (1D)

If you live in one dimension (1D), you live on a line.

Use masking tape for the line, and sticky notes for the numbers, to create a number line on the floor.

Hop on the numbers that match each inequality:

  • number > 5
  • number < 2
  • x > 0
  • x <= 6

Here is what x > 100 may look like using Scratch code. Try this at scratch.mit.edu/projects/417492043/editor

Experiencing inequalities physically, as well as visually, will create anchors for understanding coding structures.

ON A FLOOR (2D)

If you live in two dimensions (2D), you live on a flat surface, like a floor. You live on “flatland”.

Let’s add axes in two directions, to create a coordinate system for the flat surface.

Here is what x > 100 may look like using Scratch code. Try this at scratch.mit.edu/projects/665007043/editor

How would you represent these inequalities?

  • x > 200
  • x < 0

IN A ROOM (3D)

If you live in three dimensions (3D), you live in the real world.

To add the third dimension, tape one end of a string to where the 2 axes on the floor meet, and tape the other end vertically above on the ceiling.

Here is what x > 0 looks like in 3D.

What would each inequality below look like in 3D?

  • x > 100
  • x < 0

E. NUMBERS ON THE HUNDRED CHART

Go to https://learnx.ca/sets/?id=53ecb560631267fe8de955940d297efb.

Run the code to see its output.

Edit the code to create new patterns.

What did you learn so far?

How did you feel?

What else do you want to know?

F. REFERENCE VIDEOS

ABOUT INEQUALITIES

About inequalities by George Gadanidis (4.5 min.)

WHY MATH + CODING?

The affordances of modelling math with code (6 min.)

INEQUALITY AROUND US

What would you do with a billion dollars?