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
Step-by-step 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.