-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGAME_stone_paper_scissor.py
41 lines (36 loc) · 1.03 KB
/
GAME_stone_paper_scissor.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
import random
while(True):
g=["STONE","PAPER","SCISSOR"]
print(g,"\nchoose any one\n")
a=input(": ")
b=a.upper()
if b=="EXIT":
print("\nTHANK YOU FOR PLAYING\n")
break
comp=random.choice(g)
print("computer choise:",comp)
if b=="STONE":
if comp=="SCISSOR":
print("\nYOU WIN\n")
elif comp=="STONE":
print("\nDRAW PLAY AGAIN\n")
else:
print("\nCOMPUTER WIN\n")
elif b=="PAPER":
if comp=="PAPER":
print("\nDRAW PLAY AGAIN\n")
elif comp=="STONE":
print("\nYOU WON\n")
else:
print("\nCOMPUTER win\n")
elif b=="SCISSOR":
if comp=="SCISSOR":
print("\nDRAW PLAY AGAIN\n")
elif comp=="STONE":
print("\nCOMPUTER WIN\n")
else:
print("\nYOU WIN\n")
else:
print("inv4alid input \n play again\n")
continue
print("\nPLAY AGAIN.....for exit type exit\n")