runtime
49 / 500
question 49 Loops & Iteration · hard

Explain why a password is weak

A sign-up page lists every rule a password breaks, so people fix them all at once. The rules: at least 8 characters, at least one digit, at least one capital letter, and no spaces. Print one line per broken rule, in that order, or Strong when none is broken.

First linepassword = "sunny day7". Check runs your program again with other passwords
PrintsNeeds a capital letter, then No spaces allowed
MessagesToo short, Needs a digit, Needs a capital letter, No spaces allowed
Capitalsthe letters in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Expected output2 lines
  1. 1Needs a capital letter
  2. 2No spaces allowed

Loading your progress…

Explain why a password is weak — Python practice · Runtime