β back to unit
Medium
# searching medium
Is the Password Strong Enough?
The clubhouse vault needs a STRONG password: at least 8 characters, at least one digit, and at least one uppercase letter. π
You get a password. Check all three rules and print strong or weak.
Example:
Input: password = "Dragon2024"
Output: strong
It's 10 characters (β₯8 β), has digits (β), and has an uppercase D (β) β all three rules pass.
Input: password = "short1A"
Output: weak
It's only 7 characters, so it fails the length rule even though it has a digit and an uppercase letter.
π‘ need a hint?
srch-password-strong.pyπ given lines are locked β write your code in between
loading...