-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRockPaperSsi.py
More file actions
78 lines (66 loc) · 2.07 KB
/
RockPaperSsi.py
File metadata and controls
78 lines (66 loc) · 2.07 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
from six.moves import input
import random
from random import randint
list = ["Rock","Paper", "Siscors"]
while True:
while True:
Computer = list[randint(0,2)]
print(Computer)
input2 = str(input("Enter here: "))
if input2 == Computer:
print("draw")
break
elif input2 == "Rock" and Computer == "Paper":
print("Computer wins!")
break
elif input2 == "Rock" and Computer == "Siscors":
print("You win!")
break
elif input2 == "Paper" and Computer == "Siscors":
print("Computer wins!")
break
elif input2 == "Paper" and Computer == "Rock":
print("You win!")
break
elif input2 == "Siscors" and Computer == "Rock":
print("Computer wins!")
break
elif input2 == "Siscors" and Computer =="Paper":
print("You win!")
break
else:
if input2 == "":
print("Enter a valid value and try again ")
del input2
break
Computer = list[randint(0,2)]
print(Computer)
input = str(input("Enter here: "))
if input == Computer:
print("draw")
break
elif input == "Rock" and Computer == "Paper":
print("Computer wins!")
break
elif input == "Rock" and Computer == "Siscors":
print("You win!")
break
elif input == "Paper" and Computer == "Siscors":
print("Computer wins!")
break
elif input == "Paper" and Computer == "Rock":
print("You win!")
break
elif input == "Siscors" and Computer == "Rock":
print("Computer wins!")
break
elif input == "Siscors" and Computer =="Paper":
print("You win!")
break
else:
if input == "":
print("Enter a valid value and try again ")
del input
break
print("GameOver")
#Add total Number of wins in the future.