Complete the code to check whether a string is between seven and 10 characters long. # Is the password at least six characters long? lengthPW = len(pw) if lengthPW : message = "Your password is too long." valid = False elif lengthPW : message = "Your password is too short." valid = False

Respuesta :

Answer:

lengthPW = len(pw)

if lengthPW > 10:

   message = "Your password is too long."

   valid = False

elif lengthPW < 7:

   message = "Your password is too short."

   valid = False

Explanation:

You change the conditions to check if length is greater than 10 or less than 7, if it's greater than ten then it says your password is either too long or short depending on its length, then invalidates it.