forked from sanyathisside/Hacktoberfest2020
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StonePaperSeasor_TheGame.py
100 lines (77 loc) · 2.3 KB
/
StonePaperSeasor_TheGame.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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import random
print("==============Ston Paper Seasor=============\n")
lis = ["Stone","Paper","Seasor"]
name = input("Enter yout name : \t")
print("I am SHIVAM. Lets play...")
comp = 0
me = 0
print("Enter 'st' for stone \t Enter 'p' for paper \t Enter 'se' for seasor \t Enter 'e' for end this game \n")
a = 1
while a==1 :
co = random.choice(lis)
n = input()
if n == "e":
break
print("I gussed ",co)
if n == "p" :
if co == "Stone" :
me = me + 1
print ("You win \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
elif co == "Seasor":
comp = comp + 1
print ("You loss \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
elif co == "Paper" :
print ("Draw \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
elif n == "st" :
if co == "Seasor" :
me = me + 1
print ("You win \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
elif co == "Paper":
comp = comp + 1
print ("You loss \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
elif co == "Stone" :
print ("Draw \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
elif n == "se" :
if co == "Paper" :
me = me + 1
print ("You win \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
elif co == "Stone":
comp = comp + 1
print ("You loss \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
elif co == "Seasor" :
print ("Draw \n")
print ("Your points =", me)
print ("My points =", comp)
print ("\n")
else :
print("invalid syntex")
print ("\n")
print ("\n")
print ("\n")
print ("-----Game over----- \n")
print ("Your total points : \t" , me)
print ("My total points : \t" , comp)