-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.py
More file actions
54 lines (39 loc) · 1.29 KB
/
game.py
File metadata and controls
54 lines (39 loc) · 1.29 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
import random
a=random.randint(1,101)
print("let's start game. press enter")
print("you have only 5 chances to win the game")
b=int(input("enter the 1 no.- "))
if(b>a):
print("the no. you entered is greater the required no.")
elif(b<a):
print("the no. you entered is less thanthe required no. ")
elif(b==a):
print("you chooses the right no.")
c=int(input("enter the 2 no.- "))
if(c>a):
print("the no. you entered is greater the required no.")
elif(c<a):
print("the no. you entered is less thanthe required no. ")
elif(c==a):
print("you chooses the right no.")
d=int(input("enter the 1 no.- "))
if(d>a):
print("the no. you entered is greater the required no.")
elif(d<a):
print("the no. you entered is less thanthe required no. ")
elif(d==a):
print("you chooses the right no.")
e=int(input("enter the 1 no.- "))
if(e>a):
print("the no. you entered is greater the required no.")
elif(e<a):
print("the no. you entered is less thanthe required no. ")
elif(e==a):
print("you chooses the right no.")
f=int(input("enter the 1 no.- "))
if(f>a):
print("the no. you entered is greater the required no. you lost the game ")
elif(f<a):
print("the no. you entered is less thanthe required no. you lost the game ")
elif(f==a):
print("you chooses the right no.")