Introduction
A while loop helps you repeat a set of actions as long as a condition is true. It saves time by avoiding writing the same code again and again.
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 until something changes in your program.