Introduction
A while loop helps you repeat a set of actions 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 a game turn until the player wins or loses.