import random print("\tДобро пожаловать в игру ") attempts = 3 print("У тебя осталось попыток:"+str(attempts)) nomber = random.randint(0, 9) while attempts > 0: answer = input("Введите число") if answer == nomber: print("Поздравляю! Ты угадал!") attempts = 0 else: attempts -=1 print("Вы не угадали. У тебя осталось попыток:"+str(attempts)) print("Game over") 

I tried to score a specific number in the nomber, but entering its answer is still not correct

  • 3
    Can the answer need to lead to the type of int? - MAX

0