-
Notifications
You must be signed in to change notification settings - Fork 0
/
RPS.py
36 lines (36 loc) · 1.13 KB
/
RPS.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
import random
ml=["rock","paper","scissors"]
b=random.choice(ml)
a = input("Players 1's choice : ").lower()
if a:
if (a == "rock" or a == "scissors" or a == "paper") :
if a==b:
print("Computer plays:",b)
print("Tie")
elif a == "rock":
if b == "paper":
print("Computer plays:",b)
print("Computer wins")
elif b == "scissors":
print("Computer plays:",b)
print("Player 1 wins")
elif a == "paper":
if b == "rock":
print("Computer plays:",b)
print("Player 1 wins")
elif b == "scissors":
print("Computer plays:",b)
print("Computer wins")
elif a == "scissors":
if b == "paper":
print("Computer plays:",b)
print("Player 1 wins")
elif b == "rock":
print("Computer plays:",b)
print("Computer wins")
else:
print("Enter correct Value")
else:
print('You Forget to add your choice')
delay = input('Press enter to quit')
exit()