Password Checker Ali Abidi.py |
This program checks passwords by checking if it has uppercase characters, lowercase characters and numbers. If it has only one of these properties, it will say the password is weak. If it has two of the properties, it will say the password is medium strength. If it has all the properties, it will say the password is strong. For the class-blog evaluation of this lesson (10/01/2014) click here! Or scroll down and click 'read more' to view the evaluation.
Today, we were given the task to create a Python Password Strength Checker. The password had to have certain characteristics to be notes as 'weak', 'medium' or 'strong'. First off, the password HAS to be between 6 and 12 characters or the program should not give a reading on its strength. If it was under six characters, the password is too short, if it is over 12 characters, the password is too long. Mr Jogia taught us about the 'ord()' function as it converts simple string into ASCII. Mr Jogia told us the ASCII values for different characters. The values for numbersIf it has only one of these properties, it will say the password is weak. If it has two of the properties, it will say the password is medium strength. If it has all the properties, it will say the password is strong. are 48 -57. The ACSCII values for upper-case letters are 65 - 91 and the ASCII values for lower-case letters are 97 - 123. We used these values to determine if the password entered by the user contains uppercase characters, lowercase characters and numbers. If it has only one of these properties, it will say the password is weak. If it has two of the properties, it will say the password is medium strength. If it has all the properties, it will say the password is strong. Some of us achieved this task by the end of the lesson and we were all shocked to hear that this task was previously given to GCSE students as part of their coursework!