QUESTION IMAGE
Question
complete the code to check whether a string is between eight and 11 characters
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
Step1: Check for too long condition
We want to set a condition for when the password is too long. Since we want the length between 8 and 11, if the length is greater than 11, it's too long. So the first condition should be lengthPW > 11.
Step2: Check for too short condition
We need to set a condition for when the password is too short. If the length is less than 8, it's too short. So the second condition should be lengthPW < 8.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
The first blank should be filled with > 11 and the second blank should be filled with < 8