FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonprogram/Guess the no at master · deepcodespythonmorethenu/pythonprogram · GitHub
deepcodespythonmorethenu
pythonprogram
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonprogram
/
Guess the no
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (17 loc) · 565 Bytes
Breadcrumbs
pythonprogram
/
Guess the no
Copy path
File metadata and controls
17 lines (17 loc) · 565 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
n=20
number_of_guesses=1
print("Number of guesses is limited to 9 times: ")
while (number_of_guesses<=9):
guess_number=int(input("Guess the no :\n"))
if guess_number<20:
print("please input greater no:\n")
elif guess_number>20:
print("please enter less no:\n")
else:
print("you won\n")
print (number_of_gueeses, "number of guesses he took to finish.")
break
print(9-number_of_guesses, "number of guesses left")
number_of_guesses = number_of_guesses + 1
if(number_of_guesses>9):
print("Game Over")
Back
|
FazBrowse Home
|
New Git URL