Challenge: Validate Strong Passwords
To practice applying advanced regular expression techniques, you will create a password validator that checks if a password is strong.
Write a function called is_strong_password(password) that returns True if the password meets all these requirements, and False otherwise. Use regular expressions to perform the necessary checks.
Swipe to start coding
You need to create a function that checks if a password is strong using regular expressions. A strong password must satisfy all of these requirements:
- Be at least 8 characters in length;
- Include at least one uppercase letter;
- Include at least one lowercase letter;
- Include at least one digit;
- Include at least one special character (any character that is not a letter or digit).
Return True if the password meets all criteria, or False if it does not.
Solución
¡Gracias por tus comentarios!
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
What are the specific requirements for a strong password?
Can you provide an example of a strong and a weak password?
Do you want the function to return any error messages, or just True/False?
Awesome!
Completion rate improved to 6.67
Challenge: Validate Strong Passwords
Desliza para mostrar el menú
To practice applying advanced regular expression techniques, you will create a password validator that checks if a password is strong.
Write a function called is_strong_password(password) that returns True if the password meets all these requirements, and False otherwise. Use regular expressions to perform the necessary checks.
Swipe to start coding
You need to create a function that checks if a password is strong using regular expressions. A strong password must satisfy all of these requirements:
- Be at least 8 characters in length;
- Include at least one uppercase letter;
- Include at least one lowercase letter;
- Include at least one digit;
- Include at least one special character (any character that is not a letter or digit).
Return True if the password meets all criteria, or False if it does not.
Solución
¡Gracias por tus comentarios!
single