-
Notifications
You must be signed in to change notification settings - Fork 0
/
rock paper sissor game.py
52 lines (42 loc) · 1.43 KB
/
rock paper sissor game.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
42
43
44
45
46
47
48
49
50
51
52
import random
while True:
choices = ["rock","paper","scissors"]
Computer = random.choice(choices)
Player = None
while Player not in choices:
Player = input("Rock,Paper or Scissors?:").lower()
if Player == Computer:
print("computer:", Computer)
print("Player:", Player)
print("Draw!")
elif Player == "rock":
if Computer == "paper":
print("computer:", Computer)
print("Player:", Player)
print("YOU WIN !:D")
if Computer == "scissors":
print("computer:", Computer)
print("Player:", Player)
print("YOU LOSE:(")
elif Player == "paper":
if Computer == "rock":
print("computer:", Computer)
print("Player:", Player)
print("YOU WIN! :D")
if Computer == "scissors":
print("computer:", Computer)
print("Player:", Player)
print("YOU LOSE:(")
elif Player == "scissors":
if Computer == "paper":
print("computer:", Computer)
print("Player:", Player)
print("YOU WIN! :D")
if Computer == "rock":
print("computer:", Computer)
print("Player:", Player)
print("YOU LOSE:(")
Play_again = input("Play again?(Yes/No):").lower()
if Play_again != "Yes".lower():
break
print("Bye!")