-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRock paper scissor.py
30 lines (30 loc) · 1.06 KB
/
Rock 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
import random
print(" WELCOME TO THE WORLD OF ROCK,PAPER AND SCISSORS!!!","\n","ENTER 'r' FOR ROCK","\n","ENTER 'p' FOR PAPER","\n","ENTER 's' FOR SCISSORS","\n" ,"ENTER 'Z' TO STOP")
print("\n"," LETS PLAY!!!")
print("")
while True:
random_choice=random.choice(["R","P","S"])
a=input("Enter Your Weapon:").upper()
if a==random_choice:
print("IT'S A DRAW")
elif a=="R":
if random_choice=="S":
print(" CONGRATS...YOU WON!!!")
else:
print("YOU LOST","TRY AGAIN")
elif a=="P":
if random_choice=="R":
print("CONGRATS...YOU WON !!!")
else:
print("YOU LOST","TRY AGAIN")
elif a=="S":
if random_choice=="P":
print("CONGRATS...YOU WON!!!")
else:
print("YOU LOST","TRY AGAIN")
elif a=="":
print("ENTER A WEAPON","\n","ENTER 'r' FOR ROCK","\n","ENTER 'p' FOR PAPER","\n","ENTER 's' FOR SCISSORS","\n" ,"ENTER 'Z' TO STOP")
elif a=="Z":
print("")
print("**GAME OVER**")
break