import random comp_number = random.randint(1, 1000) guess_score = 0 def round(): global comp_number global guess_score guess_score += 1 if guess_score < 11: guess_input = int(input(f"Guess number {guess_score}: ")) if guess_input < comp_number: print("The hidden number is Higher") round() elif guess_input > comp_number: print("The hidden number is Lower") round() else: print("Congratulations, you won!") else: print("Uh oh, looks like you're out of luck here, buddy.") print(f"The number was: {comp_number}") round()