Up until this point, students have been writing code that executes exactly the same way each time it is run - reliable, but not very flexible. In this lesson, your class will begin to code with conditionals, allowing them to write code that functions differently depending on the specific conditions the program encounters.
After being introduced to conditionals in "Conditionals with Cards", students will now practice using them in their programs. The
if / else blocks will allow for a more flexible program. The bee will only collect nectar if there is a flower or make honey if there is a honeycomb. Students will also practice and recognize a connection between
if / else blocks and
while loops in this set of puzzles.
Students will be able to:
- translate spoken language conditional statements into a program.
- solve puzzles using a combination of looped sequences and conditionals.
Note: You will need to create a free account on code.org before you can view this resource.