Question
Task: Assume you are creating a new account for some service and you need to provide a password. The password should satisfy the following requirements
Task: Assume you are creating a new account for some service and you need to provide a password. The password should satisfy the following requirements to be accepted:
The password should be at least 6 characters long and at most 20 characters.
It must have at least one lowercase letter, one uppercase letter and one number.
Write a Python program (password_rules.py) using the methods in the table above, that prompts the user to issue a password and checks if the password is valid. If the password is valid, it will print a confirmation statement. Otherwise, it should print a statement (see Sample Output).
Method Description Returns true if the string contains only alphabetic letters or digits and is at least one character in length. Returns false otherwise. Returns true if the string contains only alphabetic letters and is at least one character in length. Returns false otherwise. Returns true if the string contains only numeric digits and is at least one character in length. Returns false otherwise. Returns true if all of the alphabetic letters in the string are lowercase, and the string contains at least one alphabetic letter. Returns false otherwise. Returns true if the string contains only whitespace characters and is at least one character in length. Returns false otherwise. (Whitespace characters are spaces, newlines (In), and tabs (It) Returns true if all of the alphabetic letters in the string are uppercase, and the string contains at least one alphabetic letter. Returns false otherwise. isalnum) isalpha() isdigit() islower() isspace () isupper ()Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started