Loading...
Loading...
Loading...
A sign-up page accepts a password only when it is strong. A strong password has at least 8 characters, at least one capital letter, one small letter and one digit, and no spaces.
Read a password and print Strong or Weak.
Strong or Weak.Example 1
Input
Abcdef12
Output
Strong
Eight characters with all three kinds.
Example 2
Input
abcdefg1
Output
Weak
No capital letter.
Try the problem first. Open one hint at a time.
Use three flags that start as False and walk through the characters once.
isupper(), islower() and isdigit() test one character. Check the length and the space at the end.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor