import random
NUMBER_ = random.randint(1,50)

def game_number():
    count :int = 0
    flag = True
    while flag:
        user_number = int(input("Введите число:"))
        count += 1
        if user_number == NUMBER_:
            flag = False
            continue
        else:
            answer = "больше" if user_number < NUMBER_ else "меньше"
            print(answer)

    else:
        print(f"Ты угадал за {count} пыток! ")

game_number()

