Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import random
num = random.randint(1, 10)
guess = None
while guess != num:
guess = input("guess a number between 1 and 10: ")
guess = int(guess)
if guess == num:
print("congratulations! you won!")
print("nope, sorry. try again!")
Copy link

James704407704407 commented Oct 22, 2021

Thanks so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment