whileEasy Playground

Starts a loop that repeats as long as its condition is true

Python Playground
Output
Click "Run" to execute your code

while repeats its body as long as the condition is True. Make sure the condition eventually becomes False or you get an infinite loop.

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?