Lockdown Programming Challenges: 1. Password Strength Indicator

Daniel Marlow - Mar 28 '20 - - Dev Community

Whether you're just starting programming or are a seasoned pro, the best way to keep your skills up-to-date is to practice.

Over the next few days and weeks I'm going to post a series of programming challenges that you can use to learn a new language, develop your clean coding skills or just while away the hours under lockdown. They will range from simple logic to advanced integrations with external services.

Remember this isn't competition and are there are no prizes, just the knowledge that you have learned something new. Kudos will be earned if your try the challenges in a new programming language or programming style (functional etc) or can write tests to show them working!

Feel free to post links to your code in the comments below and discuss different approaches and what you learned. It would be great to see how you get on.

Stay safe everyone!

Challenge 1. Password Strength Indicator

Create a program that displays the complexity of a given password using the following rules:

  • A weak password contains only letters and has less than 8 characters.
  • A medium strength password contains numbers and letters and has less than 8 characters.
  • A strong password has numbers, letters and these special characters !%:&() and has between 8 and 10 characters.
  • A very strong password has numbers, letters, the special characters !%:&() and has more than 10 characters.

Notes:

Allow the user to input their password and display the password strength on the screen.

Advanced:

Display the password strength as each character is entered by the user.

. . . . . .
Terabox Video Player