For this challenge we will write a program where the end-user has to type a password. The program will then return a score to tell the end-user how secure their password is based on the following criteria:
Criteria | Score |
The password is at least 8 characters long. | +5 pts |
The password contains number and letters. | +10 pts |
The password contains at least one punctuation sign. | +5 pts |
The password contains lowercase and uppercase characters. | +10 pts |
Complete the code
We have started the code but have only implemented the first two criteria. Your task is to implement all 4 criteria.
Test Plan
Once your code is done, complete the following tests to check that your code is working as it should:
Test # | Input Values | Expected Output | Actual Output |
#1 | Password: mypassword | 5 pts | |
#2 | Password: myPassWord | 15 pts | |
#3 | Password: myPassWord123 | 25 pts | |
#4 | Password: #myPa$$Word123 | 30 pts | |
#5 | Password: ?gB;45#wq2 | 30 pts | |
#6 | Password: (leave blank) | 0 pts |