Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
← Unit 2 tasks · Solution
Use import random. Repeatedly pick random.randint(1, 10):
import random
random.randint(1, 10)
Skills: while True, break, random.randint, counter.
while True
break
random.randint