Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 2
while loops within while loops
im writing my own hangman game and im having issues with this part while x != 6: hang = input("choose a letter : ") print("") while (len(hang)) > 1: print("one letter at a time hero") hang = input("choose a letter : ") while hang in used: hang = input("letter already used try again : ") print("") while (len(hang)) == 0: hang = input("you must guess a letter hero : ") print("") while hang.isdigit(): hang = input("your guessing words not numbers hero guess a letter : ") the issue is that if one of these catches an error it will work however if it say you enter a number and then enter two letters the double letters will go through how can i change the code to fix this
2 Answers
+ 2
I'll try the if / elif statements and see if that works and post the results
+ 1
the if elif statements worked thank you