GH avatar Bite 121. Determine the strength of a password

In this Bite you evaluate the strength of a password. Complete the function below and return a score from 0 to 5. Each of the following matches increases the score by one:

  1. Password has both lower- and uppercase letters,
  2. Password contains one or more numbers in addition to one or more characters,
  3. Password has one or more special characters,
  4. Password has a minimum length of 8 characters,
  5. Password starting 8 chars ("long enough") that doesn't have repeating characters ('1234abcd' = good, '1234abbd' = bad)

Let's brush up some regex skills and score those passwords, have fun!

25 out of 25 users completed this Bite.
Will you be Pythonista #26 to crack this Bite?
It takes an average of ~73 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 5.5 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Buy Now Login and get coding
We use Python 3.7