fork download
  1. password = input()
  2. star = 0
  3. has_digit = False
  4. has_lower = False
  5. has_upper = False
  6. if len(password) > 8:
  7. star += 1
  8. for char in password:
  9. if char.isdigit():
  10. has_digit = True
  11. elif char.islower():
  12. has_lower = True
  13. elif char.isupper():
  14. has_upper = True
  15. if has_digit:
  16. star += 1
  17. if has_lower:
  18. star += 1
  19. if has_upper:
  20. star += 1
  21. print(star)
Success #stdin #stdout 0.08s 14148KB
stdin
123.abc.ABC
stdout
4