I want to use a while loop in this program instead of a for loop, but I don't know how and where to start? Any help would be apprecieated!
def password():
guessCount = 0
password = input("Anna please enter a password here\n:")
guesser = input("Guesser please enter your name here\n:")
print("Welcome",guesser,"to the Password Guessing Game.\nYou have 8 attempts to guess my password.\nGood Luck!")
for count in range (8):
passwordGuess = input("Guess the password\n:")
if passwordGuess == password:
guessCount = guessCount + 1
print("Well Done!")
print("It took you",guessCount,"attempt(s) to guess the password!")
break
else:
guessCount = guessCount + 1
print("Try again")