(Jun-18-2020, 04:34 PM)Yoriz Wrote: you could put a separate if statement in just before asking for input so the output would be
Output:Enter Guess:1 Enter Guess:2 Last guess Enter Guess:3 Unlucky mate, out of guesses.
Like this?
while guess != secret_word and not(out_of_guesses): #if they havent guessed the word yet and have not ran out of guesses, then keep looping. if guess_count < guess_limit: #guess = input("Enter Guess:") guess_count += 1 if guess_count == 2: #guess = input("Enter Guess:") print("last guess") else: out_of_guesses = TrueWhen I enter an input, it jumps straight to
Output:Unlucky mate, out of guesses