Comp Sci 2026 Computer Science 2026

Assignment: Password Strength Checker

Due 10/26 at 11:59pm

Ever notice how websites tell you if your password is “weak,” “medium,” or “strong”? In this project, you will write a program that analyzes passwords and rates their strength based on multiple criteria.

Your program must meet the following specifications:

Loops

We will cover loops next week in class, but for now I will give you a basic for loop to copy for your program:

password = input("Enter your password: ")

# Loop that runs once for every character in the string
for character in password:
    print(f"The next character is '{character}'")

Checking for Character Types

You will have to check each character one at a time, like this:

password = input("Enter your password: ")

# Check if string contains uppercase
has_upper = False
for character in password:
    if character.isupper():
        has_upper = True

if has_upper:
    print("The password DOES have uppercase")
else:
    print("The password does NOT have uppercase")

The isupper(), islower(), and isdigit() methods check a single character.

Example Code

# TODO: Define variables

def evaluate_character(character):
    # TODO: Update variables
    pass

# Get password from user
password = input("Enter a password: ")

# Evaluate password
for character in password:
    evaluate_character(character)

# TODO: Print the rating and which criteria were met/not met

When you’re happy with your program, upload the .py file to ThinkWave.