Coders· 8-bit
Loops repeat lines. Functions give a name to a piece of code so you can use it again.
Python has two kinds of loop.
A for loop repeats a fixed number of times, with a variable that counts for you. A while loop keeps going as long as a condition stays true, so you don't need to know in advance how many rounds it will take.