Description
Lesson 8.3 teaches students how programs repeat actions based on conditions rather than fixed counts.
As the third lesson in Unit 8, this resource introduces condition-based loops using while statements, connecting directly to students’ prior knowledge of conditionals and counting loops.
Students learn how while loops work, how conditions control repetition, and why updating variables inside a loop is essential. Through tracing, guided practice, and online coding activities, students analyze loop behavior, identify infinite loops, and predict when loops will stop running.
This lesson focuses on reasoning and program flow, making it an ideal bridge between basic loop structures and debugging more complex loop logic in Lesson 8.4.
What Students Learn
✔ How while loops work
✔ How conditions control repetition
✔ How and why loops stop running
✔ What causes infinite loops
✔ How to trace condition-based loops
What’s Included
📄 Student worksheet with structured mini lesson
🧠 Guided tracing and error-spotting practice
💻 Online coding practice using JDoodle
✍️ Independent practice and reflection
👩🏫 Teacher guide with pacing and misconceptions
✅ Complete answer key
Where This Lesson Fits
📘 Course: Intro to Computer Science
📗 Unit 8: Loops and Repetition
📍 Lesson 8.3: Condition-Based Loops
This lesson should be taught after Lesson 8.2 — Counting Loops and before Lesson 8.4 — Loop Tracing and Debugging.
Grade Level
Grades 7–10
Middle School Computer Science
High School Intro to Programming
Format
Printable & digital-friendly
DOCX / PDF compatible
Highlights
Save even more with bundles
Description
Lesson 8.3 teaches students how programs repeat actions based on conditions rather than fixed counts.
As the third lesson in Unit 8, this resource introduces condition-based loops using while statements, connecting directly to students’ prior knowledge of conditionals and counting loops.
Students learn how while loops work, how conditions control repetition, and why updating variables inside a loop is essential. Through tracing, guided practice, and online coding activities, students analyze loop behavior, identify infinite loops, and predict when loops will stop running.
This lesson focuses on reasoning and program flow, making it an ideal bridge between basic loop structures and debugging more complex loop logic in Lesson 8.4.
What Students Learn
✔ How while loops work
✔ How conditions control repetition
✔ How and why loops stop running
✔ What causes infinite loops
✔ How to trace condition-based loops
What’s Included
📄 Student worksheet with structured mini lesson
🧠 Guided tracing and error-spotting practice
💻 Online coding practice using JDoodle
✍️ Independent practice and reflection
👩🏫 Teacher guide with pacing and misconceptions
✅ Complete answer key
Where This Lesson Fits
📘 Course: Intro to Computer Science
📗 Unit 8: Loops and Repetition
📍 Lesson 8.3: Condition-Based Loops
This lesson should be taught after Lesson 8.2 — Counting Loops and before Lesson 8.4 — Loop Tracing and Debugging.
Grade Level
Grades 7–10
Middle School Computer Science
High School Intro to Programming
Format
Printable & digital-friendly
DOCX / PDF compatible







