Programming Conditionals and IF Statements
Students learned about how programming conditionals, specifically if statements, work using just a deck of cards. They practiced running through a simple if statement by acting out a certain action when a red or a black card was drawn. They would have to choose between rubbing their head or patting their tummy based on the card. After that, the students had to navigate through a more complex if else statement. They had to determine which corner of the room to go to based on the suit of the card that they drew.
This learning culminated in playing a game where the team’s scoring was based on an even more difficult if else statement. Students would draw a card and use the if else statement to figure out how many points their team (or the other team) earned. Students who truly mastered the logical thinking of these conditionals were able to figure out exactly how points should be awarded.)
The rules to the game that students played at the end of the lesson. Being able to successfully navigate through the large if statement shows that students have the ability to think through computer logic.
Students working with their teacher to play game based on IF statement rules.
Students looking back at the game rules to figure out how many points should be awarded for the card that was drawn.