import random
bomb = (random.randint(1, 10))
choise = int(input("Введите число от 1 до 10: "))
restart = None
score = int(0)
def replay():
if choise == bomb:
print("You are dead")
print(score)
restart = input("Do you want to restart? y/n")
if restart == "y":
bomb = (random.randint(1, 10))
choise = int(input("Введите число от 1 до 10: "))
replay()
else:
score +=1
replay()