Password Checker

password-checkerFor 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 contains lowercase and uppercase characters. +10 pts
The password contains numbers and letters. +10 pts
The password contains at least one punctuation sign. +5 pts
The password is at least 8 characters long. +5 pts

Video Tutorial

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

Extension Task


How could you tweak your code to implement the following rules:

Criteria Score
The password contains at least 2 lowercase and at least 2 uppercase characters. +15 pts
The password contains at least 2 numbers: +15 pts
unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members Area
Tagged with: