Crazy About Conditionals

October 25, 2021

Conditionals are one of my favorite coding concepts to teach. It’s a concept that most students grasp easily in unplugged activities. Conditionals are simple “if” statements. If this happens then this will happen.

I start by asking youth a bunch of if/then questions such as:

  • What do you do if it’s raining?
    • Get an umbrella.
  • What do you do if it’s snowing?
    • Wear a coat.
  • What do you do if you are hungry?
    • Eat.
  • What do you do if you are tired?
    • Go to bed.

These simple if/then statements help them realize that conditionals statements are everywhere. We make decisions based on conditional statements every day.

Many games can be used to teach conditionals. I like to use the game of Spoons to teach conditionals. If you get 4 of the same number you grab a spoon. Then it goes one more step. If you see someone else grab a spoon, you grab a spoon. There is even an “else” statement. Be one of the people in the game to grab a spoon else you are out of the game. Playing simple games like this and having students write out the conditionals is a great way to get kids thinking about conditional statements.

The Code Spark company has created an unplugged game called the Iffy Dice Game. For this game, you just need one die per player. In this game, players use dice to roll, and depending on which number is rolled a certain task is performed. The first players play it, use the rules created on the slides. Then allow players to create their own rules and their own game. The best way to do this is by giving them the link to the Google Slides. If youth do not have access to their own computer, you could print it off and have them write out their rules for their own game. Once they have their rules, have students pair up and play. It’s a fun game that helps them understand conditionals even more.

To keep kids going and interested in learning more about conditionals, go into Scratch and have kids start coding a Pong Game. There is a tutorial that takes you through the steps to creating your own game. The conditionals of “if the sprite touches the paddle” then it will bounce. By taking conditionals one step further and adding in the coding piece they will begin to understand the concept on a deeper level.


Author

Lisa Boharty is a Computer Science Teacher and Tech Integration Specialist for East Butler Public Schools.