## Computer Science and Math

20 Jan

Our school has a 40-minute intervention/enrichment period at the end of every day, and students can take a different class each quarter.  This quarter, we made a decision for me to teach a computer science enrichment.  We invited students to join it, with the intent of targeting certain needs.  We wanted to target students who had potential to grow in math if they learned it in a little different way.  The invitation list consisted of some partially-proficient math students who might make a big leap if they learned math in a non-traditional class, and some gifted students who might enjoy an extension to what they knew.  We created the class to be balanced between girls and boys.

I’m enjoying writing a curriculum that gives kids an intro to programming but also weaves in math topics. I am making things up a little as I go, based on what kids want to learn next.  Here is what we have done so far, and I’ll include the links to the demo programs I made.

1)  Introduction to drawing.  Students learned to create shapes on the screen, and how to plot objects, thinking of the screen as a coordinate plane. We also explored RGB color – how colors on a screen are a combination of Red, Green, and Blue lights, and by turning on the lights in different proportions, you can make any color of the rainbow.

2)  Variables and Expressions.  Students learned how to “anchor” a small drawing at certain x,y coordinates, and how to create the rest of the shape around those anchor points using variables.  We discussed the relationship between these expressions and algebra expressions, and how the computer uses substitution to replace a variable with a value.

3) Binary Numbers.  I really appreciated place value when I learned and understood the world of binary, so we spent a day and a half working on building that understanding.  I mainly used worksheets from Computer Science Unplugged.  The worksheet on this webpage is great and very kid-friendly.
http://csunplugged.org/binary-numbers
I demonstrated the conversions with a Javascript program, although Javascript doesn’t have simple ways of representing binary numbers.  I haven’t used this in class yet, because I wanted to get into data types and functions before getting here.