Password Policy Checker

easy
Unit 3 · Strings III0/3 to milestone

Implement check_password(pw, username="") returning a list of all failed rules (empty if valid), using these exact messages in this order:

  1. "at least 12 characters"
  2. "a lowercase letter"
  3. "an uppercase letter"
  4. "a digit"
  5. "a symbol" (any character that isn't a letter, digit or whitespace)
  6. "no spaces" (fails if it contains any whitespace)
  7. "must not contain the username" (case-insensitive; only checked if username is non-empty)
#strings#validation2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Password Policy Checker · TechGradify