🔐
Leçon 12 · classe P1
Project: password checker
📖 Leçon
──▶
🎯 Quiz — choisis la traduction
──▶
✅ Leçon terminée
Second project — a program that checks password strength. A good password: at least 8 characters, a digit, an uppercase letter. Our program checks all three rules.
- ●len(pw) >= 8 → length
- ●any(c.isdigit() for c in pw) → has a digit
- ●any(c.isupper() for c in pw) → uppercase
- ●if len(pw)>=8 and has_digit and has_upper: → "strong!"
This is no toy — such checks sit in every signup form! You just wrote the mechanism that protects millions of accounts.
💡 Try to break your checker: "password" is weak, "Qwerty123" is strong. How to make it stricter? Add special characters!
🎯
Teste-toi !
Quiz — choisis la traduction →
🖨 Fiche de travail
Consolide le sujet avec l’entraîneur — comme après le cours