GOAL: Students will be able to…
- Identify the different control structures we can use to modify the flow of control through a program
- Combine control structures to solve complicated problems
- Choose the proper control structure for a given problem
|Control Structure||A control structure lets us change the flow of the code.|
DO THE FOLLOWING IN ORDER:
- Do 1.12.2 While Loops in Karel Quiz
- What are the different ways we have been able to control Karel in the past week?
- What are the differences and similarities of the for, if, and while loops?
- Examine the Control Structures Flowchart:
- Watch 1.13.1 Control Structures Example video
- Walk through 1.13.3 Cleanup Karel by exploring what might happen if the last if statement is removed from the program.
- Work individually or in pairs to complete 1.13.4 Random Hurdles
- Be sure to use debugging strategies so that your code is reusable in all of Karel’s worlds.
- FYI: CodeHS Online Textbook–use this as a resource
- BEFORE YOU LEAVE, WRITE ABOUT THE FOLLOWING in the Word Online file named Web Apps & Coding for this class (you will write in this file daily):
- When would you use each of the different control structures?