Coursework 1
Password Strength
An institution uses the following rules to classify the strength of passwords:
- A string is a WEAK password if it is less than 8 characters long.
- A string is a STRONG password if:
- it contains at least 11 characters
- AND it contains at least 1 lower case letter
- AND it contains at least 1 capital letter
- AND it contains at least 1 numerical digit.
- A string is a MEDIUM password if it is NOT a WEAK password AND is NOT a STRONG password.
You need to write code that will take input of a string from the keybord
and will print the strength of that string as a password, according to the
rules given above. So it should output one of the strings
WEAK, STRONG or MEDIUM
Note: Make sure your outputs are exactly the
strings WEAK, STRONG or MEDIUM (all
in capital letters) otherwise you will lose marks.
Examples:
| Examples |
| INPUT | OUPUT* |
| hello | WEAK |
| 7Kings8all9Pies | STRONG |
| brandon123 | MEDIUM |
Template file: