-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
45 lines (28 loc) · 947 Bytes
/
main.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
import random
game = ("Rock" , "Paper" , "Scissors")
while True:
computer = random.choice(game)
user=input("Enter Rock, Paper or Scissors (q-quit): ")
print("Computer played:" ,computer)
if user == computer :
print("Draw, please try again.")
elif user == "Rock" :
if computer == "Paper" :
print("You lost.")
else :
print("You won!!!")
elif user == "Paper" :
if computer == "Scissors" :
print("You lost.")
else :
print("You won!!!")
elif user == "Scissors" :
if computer == "Rock" :
print("You lost.")
else :
print("You won!!!")
elif user == "q" :
print("Thanks for playing the game!!!")
break
else :
print("Invalid input. Please learn how to play the game atleast and then come here XD.")