Home › Course contents › Level 6 - Keep Going Until…
while loops
Level 6 - Keep Going Until…
Chapter 2 · Monster League
while condition: keeps repeating until the condition is no longer true:
n = 1
while n <= 3:
print(n)
n = n + 1 # don't forget to make n bigger, or it will never stop!GoalUse while to make your partner count from 1 to 5.
TipTwo lines under while: say n, then add 1 to n.
Starting code
n = 1
# Use while to count from 1 to 5 (don't forget to make n bigger)