Notes/ML/GuessingGame-200808-185627.py

16 lines
261 B
Python
Raw Permalink Normal View History

2022-04-23 14:04:50 +00:00
secret_number = 9
guess_count = 0
guess_limit = 3
while guess_count < guess_limit :
guess= int(input('Guess: '))
guess_count+=1
if guess == secret_number:
print('You won !')
break
else:
print('Sorry you guessed all wrong !')