mathematics + coding puzzles 1



1. SQUARES & SPIRALS

“One person’s constant is another person’s variable.”
― Susan Gerhart (computer scientist)


SQUARES & SPIRALS MENUMATH + CODING MENU
1. Squares & spirals
— Constants, variables & coding
— In the classroom
1A. Puzzle 1 – squares
1B. Puzzle 2 – code a spiral
1C. Puzzle 3 – match spirals
1D. Puzzle 4 – create math art
Home page
1. Squares and spirals — introducing variables [gr. 3-9]
2. Making 10 — random coordinates line up [gr. 1-10]
3. Inequalities — in 1D, 2D & 3D [gr. 1-10]
4. Infinity — it’s big but fits in your hand [gr. 3-12]
5. Binary choice — probability, Pascal’s triangle & algebra [gr. 1-12]

Constants, variables & computer programing

by George Gadanidis, PhD


IN THE CLASSROOM

Ontario Curriculum
  • Gr. 3
    • E1.4 – give and follow multistep instructions involving movement from one location to another, including distances and half- and quarter-turns 
  • Gr. 3/4
    • C2.1 – use variables in various contexts
    • C.3.2 – read and alter existing code; sequential, concurrent, and repeating & nested events 
  • Gr. 4-6
    • E2.4 – identify and classify angles 
  • Gr. 9
  • C2.1 – use coding to demonstrate an understanding of algebraic concepts (including variables)
  • C1.1 research an algebraic concept to tell a story
  • E1.1 research a geometric concept to tell a story
Implementation
  • Gr. 3-6
    • To walk a square, we may repeat 4 times: walk 5 steps and turn right (90 degrees or 1/4 turn). Notice that the number of steps is constant.
    • To walk a spiral, the number of steps keeps changing. The number of steps is variable.
    • The process of drawing a square and then drawing a spiral anchors student understanding of constants and variables.
    • The need for a variable is especially important when we use Scratch code to draw the spiral, as the turn angle is constant and the number of steps varies.
  • Gr. 7-9
    • The above may be used as a review of the meaning of constant & variable.

1A. PUZZLE 1 – SQUARES

Below are 2 different ways to draw a square with code. You can click and run the code at https://scratch.mit.edu/projects/1055180217/editor/

Q1. Edit SQUARE 1 code to draw a smaller square.

Q2. Edit SQUARE 2 code to draw a smaller square.

Q3. How is the code for SQUARE 1 and the code for SQUARE 2 similar or different?

Q4. Which code do you like better? Why?


1B. PUZZLE 2 – CODE A Spiral

Q5. Edit SQUARE 1 code to draw a spiral like the ones shown below.


Q6. Editing SQUARE 2 code to draw a spiral like the ones shown below is not as simple. Why?

This image has an empty alt attribute; its file name is puzzle-1-2-spirals.png

Q7. Below is one way to edit SQUARE 2 code to draw a spiral. How is SPIRAL 2 code different from SQUARE 2 code?


1C. PUZZLE 3 – Match Spirals

You can click and run the SPIRAL 2 code at https://scratch.mit.edu/projects/1055189920/editor

Q8. Edit the code to create each of the following spirals.


1D. PUZZLE 4 – CreatE Math Art

Q9. Edit the SPIRAL 2 code to create your own math art.


SQUARES & SPIRALS MENUMATH + CODING MENU
1. Squares & spirals
— Constants, variables & coding
— In the classroom
1A. Puzzle 1 – squares
1B. Puzzle 2 – code a spiral
1C. Puzzle 3 – match spirals
1D. Puzzle 4 – create math art
Home page
1. Squares and spirals — introducing variables [gr. 3-9]
2. Making 10 — random coordinates line up [gr. 1-10]
3. Inequalities — in 1D, 2D & 3D [gr. 1-10]
4. Infinity — it’s big but fits in your hand [gr. 3-12]
5. Binary choice — probability, Pascal’s triangle & algebra [gr. 1-12]

by George Gadanidis, PhD