Introduction
A while loop helps you repeat a set of instructions as long as a condition is true. It saves you from writing the same code many times.
When you want to keep asking a user for input until they give a valid answer.
When you want to count up or down until a certain number is reached.
When you want to keep checking if a task is done before moving on.
When you want to repeat an action but don't know in advance how many times.