Search This Blog

Saturday, September 24, 2016

Math Mini-Lessons and Coding in K-5

In the last few years I've recently become very interested in coding-- learning it and teaching it-- and have been working on bringing more coding into our K-5 classrooms (read more in my previous post about coding after the "Hour of Code"). As a math coach and enthusiast, I am also passionate about using coding as a way of teaching, and engaging students in, mathematics. I believe in teaching math in context-- to help students construct lasting connections while learning math, and to help them enjoy learning math.

When it comes to teaching math in context, coding and mathematics are a natural fit.

Direction blocks
Directional terms
Especially for the younger students, coding is a great way to learn directional terminology in context! Asking students to move a robot (or a character on a screen) forward, backward, left or right can be more of a challenge than you think and really pushes students to think about what those terms really mean (i.e. 'forward' is always changing because it means moving in the direction that you are facing).

From metric units to pixels, coding robots to coding video games, coding definitely requires a programmer to work with one, if not multiple, forms of measurement:
  • Distance-- "Forward 10"? "Move 10 steps"? If students want a robot or character to move a certain distance, they need to learn what "10" means in different coding programs (Dash robots move 10 cm. at a time, while a sprite in Scratch is moving 10 pixels, etc.). In either situation, coding activities are a fun way for students to use measurement skills, and practice calculating distances, in a real and useful context.
  • Angle measurements-- Want your robot or sprite to make a turn? You'll have to tell the computer how many degrees to turn the object. 90 degrees? Or 180? Or 35? Give students a mini-lesson in right angles, or teach them how to use those protractors, and then let them figure out what angle they need to program their object to move to get to where they need to go! (SO much more engaging than those silly measurement worksheets where students are supposed to practice measuring random angles out of context!)

Notice a pattern?
Students struggling with the idea of variables? How about playing with variables (values that can change) in a coding task. Looking at variables in coding give students a concrete example of how a value might change.

Coding is all about patterns! One of my favorite Raspberry Pi programming lessons (the "Traffic Lights" lesson) starts by having students learn how to program the red LED on a stop light by copying some code in the instructions. Then students are asked to repeat the code to make the yellow and green lights blink in the same manner. Students have to look for the pattern and then repeat it-- fantastic math task!

Repeated addition/multiplication
I've seen students as young as pre-kindergarten pick up on repeated addition or multiplication concepts (on their own!) during coding tasks. For example, in Scratch Jr. students typically first program their cat to move multiple steps by attaching one forward arrow to another to another to another... until they notice that they can change the value of one forward arrow to represent multiple steps. Realizations like this are perfect teachable moments! Teachers can use discoveries like this as the intro to a lesson on repeated addition and it's relationship to multiplication.

Decimals fractions
Sense Hat on Raspberry Pi
Pause times and wait times in a code require students to have some knowledge of decimal fractions. Want the wait time between commands to be less than 1 second? Decimal fractions!

Students can use programs like Scratch to code a character/sprite to move to certain coordinates on the screen, or create a digital image on a Sense Hat on a Raspberry Pi by programming certain coordinates on the hat to light up. Just two examples of the ways that students can learn about graphing and XY coordinates by having to use them.

Positive/Negative Integers
Coding movement using the 4-quadrant coordinate grid in Scratch is a great way for students to learn more about positive and negative integers. Students move their character around by plotting (x,y) coordinates or by changing the value of their "x" or "y" coordinate by a certain positive (move right) or negative (move left) distance.

Created in Scratch by @mshaughs

No comments:

Post a Comment