import random correct_answer = random.randint(1, 10) guess = 0 while guess != correct_answer: guess = int(input("Gissa ett tal mellan 1 och 10: ")) if guess == correct_answer: print("Correct!") else: print("Wrong :(")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter