Please enable JavaScript to use CodeHS

Intro to Programming with Tracy and micro:bit

Lesson 6.3 While Loops

Description

In this lesson, students will learn that while loops allow code to be executed repeatedly based on a condition. They will also be warned that infinite loops are created if the exit condition of the while loop is never met, causing the code inside the while loop to repeat continuously which causes the program to crash.


Objective

Students will be able to:

  • Effectively use while loops in their programs
  • Identify infinite loops