I'm trying to get the user to enter a password (when making an account for my quiz) and check that the password is over 6 characters. If it isn't, it will loop back and ask the user to try another password. Here's what I've got so far:
def password ():
password = input("enter a password over 6 characters")
count = 0
for letter in password:
count = count + 1
while count < 6:
password = input("password too short try again")
password ()
Here's what I get if my password is long enough:
enter a password over 6 characters longpassword
Here's what I get if my password's too short:
enter a password over 6 characters lol
password too short try again lol
password too short try again longpassword
password too short try again
It doesn't seem to count the characters after the first time and I don't know why.