-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrock-paper-scissors.py
More file actions
32 lines (28 loc) · 877 Bytes
/
rock-paper-scissors.py
File metadata and controls
32 lines (28 loc) · 877 Bytes
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
import random
choices = ["Paper", "Rock", "Scissors"]
choose = str(input("Rock, Paper, Scissors: "))
number = random.randint(1, 2)
computerChoose = choices[number]
def main():
if choose == "paper":
if computerChoose == "Rock":
print("Won")
if computerChoose == "Paper":
print("draw")
if computerChoose == "Scissors":
print("Loss")
if choose == "Rock":
if computerChoose == "Paper":
print("Loss")
if computerChoose == "Rock":
print("Draw")
if computerChoose == "Scissors":
print("Won")
if choose == "Scissors":
if computerChoose == "Paper":
print("Won")
if computerChoose == "Rock":
print("Loss")
if computerChoose == "Scissors":
print("Draw")
main()