-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rock Paper Scissors.py
41 lines (37 loc) · 1.36 KB
/
Rock Paper Scissors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from random import randint
choices = ["Rock", "Paper", "Scissors"]
computer_choice = choices[randint(0,2)]
player_choice = input("Rock, Paper, Scissors? ")
if player_choice == computer_choice:
print("Bot choice: ", computer_choice)
print("Your choice: ", player_choice)
print("Result: Tie!")
elif player_choice == "Rock":
if computer_choice == "Paper":
print("Bot choice: ", computer_choice)
print("Your choice: ", player_choice)
print("Result: You lose!")
else:
print("Bot choice: ", computer_choice)
print("Your choice: ", player_choice)
print("Result: You win!")
elif player_choice == "Paper":
if computer_choice == "Scissors":
print("Bot choice: ", computer_choice)
print("Your choice: ", player_choice)
print("Result: You lose!")
else:
print("Bot choice: ", computer_choice)
print("Your choice: ", player_choice)
print("Result: You win!")
elif player_choice == "Scissors":
if computer_choice == "Rock":
print("Bot choice: ", computer_choice)
print("Your choice: ", player_choice)
print("Result: You lose!")
else:
print("Bot choice: ", computer_choice)
print("Your choice: ", player_choice)
print("Result: You win!")
else:
print("The choice is not valid!")