If I have a line that says the following:
3 guesses left
After the print statement for this I have a loop that allows the user to input something and remove one from guesses each time e.g.
guesses = 3
while guesses > 0:
guess = input("Have a guess: ")
guesses -= 1
After the last line of code how can I make it continue to iterate through the while loop but instead of printing extra lines that say 2 guesses left
, 1 guess left
, 0 guess left
, simply change the number in the first line?