Put your control flow skills to use! Create a program that checks how strong a password is based on a few simple rules.
YOUR TASK
Create a program that:
Asks the user to enter a password
Checks if the length is 8 or more characters
Checks if it contains at least one number
Prints Weak, Medium, or Strong
Rules: less than 8 chars → Weak. 8+ chars OR has a number → Medium. 8+ chars AND has a number → Strong.
Need a hint?
Step-by-step:
1. password = input("Enter password: ")
2. Check len(password) >= 8
3. Loop through chars: for c in password: if c.isdigit(): ...
4. Use if/elif to decide Weak / Medium / Strong
5. print("Strength: " + strength)
Example (input: secure12345):
Enter password: secure12345
Strength: Strong
Code Editor Ready
Output
Console
Console initialized...
Ready for Project 2: Password Strength Checker
> Test your code with the "Check My Code" button
> When it works, the Complete button will activate!