You can also repeat code using a do while loop. This works like the while loop, but the condition appears after the loop’s instructions. This means that you have to run these instructions at least once.
Example
The following example shows a menu in the terminal. This is one place where a do while loop can work well.