Skip to main content
🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial →
← CoursesPython FoundationsModule 9 · Bonus: mini-projectsMINI: Password strength validator (5-rule scoring)mission172 / 174
+200 XP
Task
Implement `strength(pw)` returning one of six labels based on the five rules. Run on 4 passwords and print each label: "abc" -> weak (1 rule passes — lowercase only) "abcdef12" -> ok (3 rules) "Abcdef12" -> good (4 rules) "Abcdefgh1234!" -> very strong (5 rules) (Score 0 = "very weak" — empty string / nothing passes. None of the 4 test inputs hit that, but the label is still in the table.) Expected: weak ok good very strong
✏️ Write your code here
🐍
Loading Python...
One-time download (~1 MB). Then it runs instantly.
📊 Result
Press Run to see result...

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…