0 10 20 30 40 50 60 70 80 90 100 70327 0

Welcome to type with code

Start typing or press to get going!

The python code you'll be racing to type out is all about:

While loop

A while loop will keep repeating whilst a condition is met (it will stop repeating when the condition is no longer met). 

This is known as a pre-conditioned loop because the program checks if the condition has been met before the code in the loop runs. This means that the minimum number of times the loop will run could be 0.

It is also an example of indefinite iteration because the loop could carry on forever unless the condition is met.

This example program keeps asking the user "Are we nearly there yet" until they say "yes"