-
Notifications
You must be signed in to change notification settings - Fork 0
/
rockpaper.py
35 lines (30 loc) · 853 Bytes
/
rockpaper.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
import random
t = ["Rock", "Paper", "Scissors"]
computer = t[random.randint(0,2)]
contrinue_playing = True
while contrinue_playing:
print("Enter You option:")
player = input("Rock, Paper, Scissors?\n")
if(player == "Stop"):
break
if player == computer:
print("Tie!")
elif player == "Rock":
if computer == "Paper":
print("You lose!", computer, "covers", player)
else:
print("You win!", player, "breaks", computer)
elif player == "Paper":
if computer == "Scissors":
print("You lose!", computer, "cuts", player)
else:
print("You win!", player, "covers", computer)
elif player == "Scissors":
if computer == "Rock":
print("You lose!", computer, "breaks", player)
else:
print("You win!", player, "cuts", computer)
else:
print("Invalid input. Try Again!")
player = False
computer = t[random.randint(0,2)]