-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.py
More file actions
21 lines (21 loc) · 798 Bytes
/
Game.py
File metadata and controls
21 lines (21 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import random
n=random.randint(1,5)
Number_of_Guesses = 1
print("---------Number of Guess Limit is only one Time ------------------- ")
while (Number_of_Guesses<=2):
Guess_Number=int(input("Enter the Guess No. :-"))
if Guess_Number<n:
print("You enter the samll numer .Please Input is Greater ")
break
elif Guess_Number>n:
print("You Greater Number Please enter the Small no. :-")
break
else:
print("!!!!!!!!!!!!!!----You Won---!!!!!!!!!!!!!!!!!!")
print( Guess_Number,"===>The Number which you took to finish")
break
print(2 - Number_of_Guesses,"Number of Guess left")
Number_of_Guesses+=1
if Number_of_Guesses>2:
print("game Over!!!!!")
print("you System no was :-",Number_of_Guesses)