While planning for the logic unit in geometry a few weeks ago, I wanted to increase the rigor and apply a more meaningful experience to the topic than I had in previous years. In the past, I have had kids do a project in which they found ads in magazines that used (or could be rewritten to use) conditional if-then statements. Then they rewrote the ads to include the converse, inverse, and contrapositive statements. I think this is a fun activity and it is a really great way to have students recognize if-then statements in the real world, however, I began to think that this experience might not be project worthy. I found that asking students to rewrite the statements did not have a lot of meaning to them and some of the mathematical logic got lost when they simply repeated a statement about shampoo or men’s deodorant.
So this year instead, I planned to use the ads as just a warm up by showing students an Allstate commercial and asking them to identify the if-then statements. Then, I started thinking about what else in our world uses conditional statements and how I could make a more meaningful and rigorous project. I realized computer science uses if statements for a program to do something if a condition is met. Several years ago I worked for a company where I used coding, but I knew I needed to brush up on my understanding before I could teach it to kids. In my search to make this project of relating conditional statements in geometry to computer programming, I stumbled upon two helpful resources: Pearson and Khan Academy.
In our Pearson textbook, there are enrichment activities and coincidentally, the textbook had a similar idea to mine for the logic unit. They gave students some code and asked them to identify the hypothesis and conclusion in it. However, they used GOTO which is a bit outdated and not used a lot anymore. So, I held on to their idea about dissecting code and rewriting the hypothesis and conclusion, but searched around for a more relevant platform.
In my mind I wanted students to actually write code, manipulate it, and see it work with this project. I soon found Khan Academy’s tutorials on if statements and as I was working through them, I found that it was the perfect match to what I wanted. The tutorials teach students how to edit code with different scenarios and then students do a similar challenge to try to master the code. In the first challenge that I had students do, they were shown a ball that drops off the screen and they had to use if statements to make it go back the other way, displaying a bouncy ball effect on the screen.
For the project, I created a worksheet for students to use while they watched the tutorials, practiced the code, and performed challenges to see that their code actually worked. It asks the student to rewrite the if statements as a hypothesis and conclusion (similar to Pearson), decide if there is a biconditional phrase, and then also use the inverse code to manipulate it again.
Overall this project went great…it has now become one of my new favorites!! Every student was engaged in the tutorials and the challenges; I saw them have a sense of ownership in their learning because they could self direct and work at their own pace. When students got the code, several of them got so excited and called me over showing off their successes. I also had a lot of really interesting conversations during and after the project…one student said they can now imagine how complex creating a video game would be with all the coding involved. Several students said they understood why their program needed both the if and the then components to make it work and really liked seeing their work actually do something. I am excited to read their blog posts soon (they’re due on Tuesday) and hear how they summarize the project and learning objectives!