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 and will learn how the break
statement can be used to avoid this.
Students will be able to:
break
statement inside while loopsThese are all the activities included in the lesson