Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import *
- player = int(input("Сделайте ваш выбор (камень - 0, ножницы - 1, бумага - 2): "))
- if player == 0:
- print("Выбор игрока: камень")
- elif player == 1:
- print("Выбор игрока: ножницы")
- elif player == 2:
- print("Выбор игрока: бумага")
- computer = randint(0, 2)
- if computer == 0:
- print("Выбор компьютера: камень")
- elif computer == 1:
- print("Выбор компьютера: ножницы")
- elif computer == 2:
- print("Выбор компьютера: бумага")
- if player == computer:
- print("Ничья")
- elif player == 0:
- if computer == 2:
- print("Победил компьютер")
- elif computer == 1:
- print("Победил игрок!")
- elif player == 1:
- if computer == 0:
- print("Победил компьютер")
- elif computer == 2:
- print("Победил игрок!")
- elif player == 2:
- if computer == 1:
- print("Победил компьютер")
- elif computer == 0:
- print("Победил игрок!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement