Day 19: First Functions in Computational Modeling

Friday, September 29, 2018

This year, my team and I are teaching Physics 1 (9th grade) through Computational Modeling. This curriculum uses Pyret, a language developed in part to help students learn math and science.

Today, we asked the students to think concretely about a square’s perimeter.

One kid asked why we’re learning to code. Clearly I hadn’t answered this question adequately the last few times, so I showed a computational model from next week that models a buggy moving at constant velocity. It’s familiar and they can see where their work is headed.

So, back to the square, I asked: Then we wrote a Pyret function to find the perimeter of a square. Students worked off a Design Recipe on paper before going for the computer. With everyone computing some solid perimeters, we turned our attention to finding the area of a square. I assigned writing functions to find the perimeter of a rectangle and the area of a rectangle for homework.