Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

Monday, November 14, 2016

Exploring Polygon Relationships in Scratch



My grade nine class is currently investigating relationships between two variables. I wanted to find some interesting data to look at but also wanted it to be connected to other parts of the course. It occurred to me one day that the geometry portion of the course has students making connections between the number of sides in polygons and the sum of the interior and exterior angles of polygons. This seemed like a good relationship to look at.

I figured this would be a good opportunity to do some coding. I had students visit the Scratch website. A couple of students had used it before, but for most of them this was a new experience. We talked about how you might give somebody clear instructions to walk in a square then we coded those instructions in Scratch and before long everybody had a square. I then instructed students to create a regular triangle, pentagon, hexagon and heptagon. Upon completing each figure they completed the table on the handout.

After collecting the data they proceeded to investigate the relationship between the number of sides and the sum of the interior/exterior angles.

It was fun to watch them. Some started working by trial and error, others were able to make some connections right away. Many who found a solution quickly helped others make the same connections. This was a great way to integrate coding with the relationships and the geometry section of the course.

This activity had me thinking about how I might use a similar activity to have students draw triangles that were not equilateral. It seems like it could be a good application of the sine & cosine laws.

Here's the handout:


Friday, April 3, 2015

Coding & Probabiltiy


I wanted to spruce things up a little in my grade 11 college math class. My students were working on probability and I was looking to make it more interesting. 

I decided I would have them code games that use probability in Scratch. I choose Scratch because it's easy to use and you don't have to spend a lot of time on syntax. It's also free and web-based, which means it will work on any device that supports Flash. By creating a free account students are able to save their work and they can publish their finished products so that other people can play them.

I started walking students through how to simulate tossing a coin. If you're looking for a tutorial, check out the one made by @brianaspinall here. We spent the better part of a period working on this. The next day I was away, but I left this handout. Students were to 'play' with their coin flipper and make observations about theoretical and experimental probabilities. Once they were finished they had to create a similar program that involved the rolling of a die. They repeated the experiments and then moved on to two dice. The last part of the assignment was for them to create a game using the dice. I was hoping that they would create three games: one that was fair, one that was in the computer's favour and one that was in the user's favour. Upon my return I realized that this was going to take to long. I think next time I will have them choose which type of game to make and to explain what makes it advantageous (or not).

What I liked about the assignment is that students seemed to enjoy themselves. They could be creative. Many of them made some very nice looking dice and backgrounds. They had to do some problem solving when the program didn't work. Best of all, they had a chance to make something with what they learned in math. I would certainly do it again in the future.