App 3: Password Generator & Checker / Build the password tool
Lesson 7 of 10
Helpful tips
A score alone doesn't help. Collect tips like 'make it longer' or 'add a symbol' and print them.
Key points
- Build a list of tips
- Only show what's missing
- Encourage, don't scold
def tips(pw):
out = []
if len(pw) < 14:
out.append("Make it at least 14 characters.")
if not any(c.isdigit() for c in pw):
out.append("Add a number.")
return outYour turn
Add tips for missing uppercase letters and symbols too.
Quiz · +10 XP
When should the 'make it longer' tip appear?
Log in to save progress and earn XP.