Created
March 29, 2020 20:03
-
-
Save Deep18-03/fda89d56745a873614f25d34962c609d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#guess the number program | |
from random import * | |
secret_no=randint(1,20) | |
for guess_taken in range(1,7): | |
guess_no=int(input("enter the number between 1 to 20 ")) | |
if guess_no < secret_no: | |
print('your guess is low') | |
elif guess_no > secret_no: | |
print('your guess is high') | |
else: | |
break | |
if guess_no==secret_no: | |
print('your assumption is true'+' secret number is '+str(secret_no)) | |
else: | |
print('you fail') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment