Objective
Create a Python program that checks whether a password meets some rules and says which ones it breaks.
Instructions
- Read a password.
- Check these rules, in this order: at least 8 characters, at least one capital letter, at least one lower-case letter and at least one digit (
isupper(),islower(),isdigit()). - For each rule that is not met, show a line:
Must have at least 8 characters,Missing an uppercase letter,Missing a lowercase letterorMissing a digit. - If all of them are met, show only
Valid password.
abc
Must have at least 8 characters
Missing an uppercase letter
Missing a digit
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise