""" userinput.tpy Get a number from 1 to 10 from the user. No matter what. """ while True: stuff = input("Input a number from 1 to 10. ") try: i = int(stuff) except: i = -1 if 1 <= i and i <= 10: break else: print("That isn't a number between 1 and 10. Try again.") print("Your number is {}".format(i))