Passwords, Please: Why Your Cat’s Name Isn’t Good Enough

Day 26 of 100 Days Coding Challenge: Python

As someone who is doing accounting for a living—and not just the easy kind, mind you, but the multi-state, bank-reporting, ERP-wrangling kind—I juggle more passwords than a magician with trust issues. At last count, I had around near 20 different passwords scattered across platforms like SAP, Microsoft, banks, state websites, and yes, even the mysterious beast that is Windows.

Now, an ERP system like SAP doesn’t mess around. It demands long, complex passwords that look like someone accidentally fell asleep on the keyboard. So, I figured—if I can understand how these systems judge password strength, maybe I can outsmart them. Or at least, use the same logic to fortify my Amazon or bank logins. I mean, no one’s hacked me (yet), but why wait for disaster when I can beat the bots at their own game? Today’s mission: test the strength of my passwords using Python. Because if I can calculate depreciation schedules, I can definitely calculate how weak “Fluffy2021!” really is.

Today’s Motivation / Challenge

Let’s face it—most of us are one sticky note away from giving up on remembering our passwords. That’s what makes today’s project kind of brilliant: instead of memorizing 27 variations of “qwerty123!”, we’re learning to evaluate passwords for strength. It’s a practical tool with just enough spy-movie flair to feel exciting. Plus, there’s something satisfying about making a program that judges your passwords before a hacker does.

Purpose of the Code (Object)

This simple program acts like a personal password bouncer. You hand it a password, and it tells you whether it’s weak, moderate, or strong. It does this by checking for things like length, numbers, special characters, and uppercase letters—basically the same stuff most secure systems look for, minus the scolding tone.

AI Prompt:

Create a Python program that evaluates password strength based on length, use of uppercase and lowercase letters, digits, and special characters. Return a score and give user-friendly feedback.

Functions & Features

  • Checks password length and gives points accordingly
  • Evaluates if you used uppercase + lowercase letters
  • Looks for numbers and special characters
  • Provides a strength rating: Weak, Moderate, or Strong
  • Offers suggestions to improve your password

Requirements / Setup

You’ll need:

Python 3.x

No extra libraries needed. Just plug and play.

Minimal Code Sample

import re

def check_strength(pwd):

    score = 0

    if len(pwd) >= 12: score += 2

    if re.search(r'[A-Z]’, pwd) and re.search(r'[a-z]’, pwd): score += 1

    if re.search(r’\d’, pwd): score += 1

    if re.search(r'[!@#$%^&*]’, pwd): score += 1

    return score

This snippet scores a password based on length and character variety.

Password Checker GUI

Notes / Lessons Learned

The program was surprisingly easy to write—and even easier to obsess over. It’s just a few if-else checks and a running score tally, but the real fun starts when you feed in your actual passwords. I tried mine. Every single one came back as “Moderate.” Not “Weak,” which was a relief, but not “Strong” either. Apparently, I’m living in the password middle class. Turns out, all I need is a few more letters or symbols to boost my score. So maybe it’s time to retire “Fluffy2021!” and embrace something like “S@pTaxQueen2025.” Catchy, no?

Optional Ideas for Expansion

  • Add a live strength meter (green/yellow/red bar) using Tkinter for a GUI
  • Store password feedback history in a CSV for tracking

Leave a Reply

Your email address will not be published. Required fields are marked *