Introduction
Loops help you repeat actions without writing the same code many times. While and do-while loops let you repeat code as long as a condition is true.
When you want to keep asking a user for input until they give a valid answer.
When you want to process items in a list until you reach the end.
When you want to repeat a task until a certain condition changes.
When you want to keep checking if a game is over before continuing.
When you want to run a block of code at least once, then repeat it if needed.