import random while True: comp = random.randint(1, 3) user = int(input("1 - камень, 2 - ножницы, 3 - бумага: ")) if comp == user: print("Ничья, попробуйте снова!") continue if (user == 1 and comp == 2) or (user == 2 and comp == 3) or (user == 3 and comp == 1): print("Вы выиграли!", comp) else: print("Компьютер выиграл!", comp) break