Preview:
def check_password(password):
    if len(password) < 8:
        return "Weak"
    elif len(password) <= 11:
        return "Medium"
    else:
        return "Strong"

num = int(input("How many passwords? "))
strong_count = 0

for i in range(num):
    pwd = input("Enter password: ")
    result = check_password(pwd)
    print(result)
    if result == "Strong":
        strong_count += 1

print("Number of strong passwords:", strong_count)
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter