Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
stamps = 0
free_drinks = 0
while free_drinks < 2:
stamps += 1
print("Stamps:", stamps)
if stamps == 10:
print("Free coffee!")
free_drinks += 1
stamps = 0
print("Earned", free_drinks, "free drinks in this simulation.")