03 Dec Aurora Saturday 14:30 Python Homework 11.30.
Posted at 21:13h in Aurora Saturday 14:30 0 Comments
Create a PWD(Password) class it will contain the following methods:
- to create a password object by passing one argument into it
- to check the validity of password input by users. it need to use the following method:
- checkLetter: At least 1 letter between [a-z] and 1 letter between[A-Z].
- checkNumber: At least 1 number between [0-9].
- checkSymbol: At least 1 character from [$#@].
- checkLength: Minimum length 6 characters. Maximum length 16 characters.
def __init__(self, password):
myPwd = PWD(input("Please enter your password:"))
if myPwd.validate() == True:
Sample input 1:
Please enter your password: admin123
Sample output 1:
Missing at least 1 character from [$#@]
Sample input 2:
Please enter your password: admin123$
Sample output 2:
Sorry, the comment form is closed at this time.