Students will be able to...
- Define and identify: while loop.
- Use a while loop to simulate game play.
- 2.06 Slide deck
- Do now
- Lab - Tic-Tac-Toe revisited (docx) (pdf)
- Associated readings 2.7
- Read through the do now, lesson, and lab so that you are familiar with the requirements and can assist students
- Video Resources:
Duration | Description |
---|---|
5 Minutes | Do Now |
10 Minutes | Lesson |
35 Minutes | Lab |
5 Minutes | Debrief |
- Students experiment with creating
while
loops.
- Ask students what the
while
loops that they created did. - Go over the syntax of
while
loops. Use this as an opportunity to remind students of Boolean expressions.
- Ask: how might while loops be useful?
- Ask students to consider how they could write a loop using user input.
- What if you wanted the loop to stop when the user inputs "quit"?
- Have the students think about and write a solution.
- Call students up to the board to write out how they solved it.
- Students work to create a Tic-Tac-Toe game that allows turns (up to 9), building on their previous work.
- Check for completion and understanding of the lab.
If there is extra time, have students start reading through the final project specs and thinking about how they will apply what they have learned this unit to complete the project.