All projects
Intermediate+90 XP

Password Strength Checker

Write a function that labels a password strong or weak. A password is strong if it's at least 8 characters and contains both a digit and a letter. Practices conditions, string methods, and the handy any() built-in.

Requirements

  • 1

    A password is 'strong' if length ≥ 8 AND it has a digit AND a letter

  • 2

    Otherwise it's 'weak'

  • 3

    Check several sample passwords and print the verdict for each

Build it here — edit the starter code and hit Run:

password-checker.py · editable