Will It Crash?
This lesson uses eraser head "robots" to explore the different types of selection-statements: if, if-else, etc. Students read code to determine a robot's final position and determining whether or not the robot will crash into an object. This lesson is adapted from code.org's lesson.
Materials
Document Camera (optional)
Eraser Heads
Slides
South Carolina Computer Science and Digital Literacy Standards
Computer Science Standard
3.AP.2.1 Describe, using picture models, an ordered list of steps to perform a simple task.
3.AP.4.1 Use picture directions to design a series of steps to complete a simple task. 3.AP.4.2 Test a series of directions to successfully complete a simple task.
4.AP.2.2 Recognize that the same steps can be ordered in different ways to perform the same task (i.e., simple control structures).
5.AP.1.1 Execute a sequence of instructions (i.e., algorithm) that mimic a daily task.
5.AP.2.2 Identify the result of a conditional statement (e.g., in the statement, “If it is dark, then turn on the light,” the result is the lights turning on)