Jul-12-2019, 11:57 AM
Noob taking the first steps with Python here, I tried the following:
# guessing game secret = 'supernoob' guess = '' attempts = 0 maxtry = 3 out_of_tries = False # logic loop while guess != secret and not out_of_tries: if attempts < maxtry: guess = input('guess the secret: ') attempts =+ 1 else: out_of_tries = True # outcome if out_of_tries: print('You Lose!') else: print('You Win')the software (partially) works, but it doesn't stop at maxtry value. What am I doing wrong?