-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
81 lines (76 loc) · 1.96 KB
/
main.py
File metadata and controls
81 lines (76 loc) · 1.96 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
79
80
81
def main():
a=input()
global l,k,m,n,j
if a=='i':
l+=1
k+=1
if(k==2):
print("you have used I 2 times you have losed ")
exit()
if(l==4):
print("you wins")
exit()
print("you are right but if you use it more than once you will lose ")
return main()
if a=='s':
l+=1
m+=1
if(m==2):
print("you have used S 2 times you have losed")
exit()
if(l==4):
print("you wins")
exit()
print("you are right but if you use more than one time you lose")
return main()
if a=='h':
l+=1
n+=1
if(n==2):
print("you have used H 2 times you have losed")
exit()
if(l==4):
print("you wins")
exit()
print("you are right but if use than one time you will lose it")
return main()
if a=='u':
l+=1
j+=1
if(j==2):
print("you have used U two times you have lose the game ")
exit()
if(l==4):
print("you wins")
exit()
print("you are right but if use than one time you will lose it")
return main()
else:
print("you are wrong")
global t
t-=1
if(t==5):
print("you have 5 more chances left")
return main()
if(t==4):
print("you have 4 more chances left")
return main()
if(t==3):
print("you have 3 more chances left")
return main()
if(t==2):
print("you have 2 more chances left to guess ")
return main()
if(t==1):
print("you have 1 more chance left")
return main()
if(t==0):
print("you lose")
exit()
l=0
t=6
k=0
m=0
n=0
j=0
main()