When Banks Get Boring, Build Your Own Converter

Day 35 of 100 Days Coding Challenge: Python

As an accountant, I sometimes find myself wrangling with currencies like the Euro or the Yen—especially when it’s time to pay international vendors. Sure, I could just hop over to a bank’s website to check the latest rate and be done with it. But where’s the fun in that? There’s something satisfying about making a mini tool that does the fetching for you. It’s like teaching your computer to do the boring part while you sip coffee and pretend you’re working very hard. Besides, who wouldn’t want their own personal exchange rate butler?

Today’s Motivation / Challenge

Today’s project was all about merging curiosity with practicality. Currency converters might not sound glamorous, but they’re surprisingly useful—and they offer the perfect excuse to explore how APIs work in the wild. Plus, if you’ve ever had to double-check if you’re about to overpay a vendor in yen, you’ll understand the thrill of watching your own Python script spit out the answer faster than your bank’s clunky interface ever could.

Purpose of the Code (Object)

This script fetches real-time exchange rates and converts any amount between two currencies. Instead of trusting your memory or the whims of Google, you can just run this quick script and let it do the math. It’s lightweight, no fuss, and runs right in your terminal.

AI Prompt:

Convert currency between any two valid codes using live data. Keep it light. No API keys, no hassle.

Functions & Features

  • Converts between any two standard currency codes (e.g., USD to JPY)
  • Fetches live exchange rates from a free public API
  • Displays the converted amount in real time
  • Includes error handling for invalid codes or bad input

Requirements / Setup

You’ll need:

pip install requests

Works with: Python 3.x

Minimal Code Sample

url = f”https://open.er-api.com/v6/latest/{from_currency.upper()}”

response = requests.get(url)

rate = response.json()[“rates”].get(to_currency.upper())

converted = amount * rate

This fetches the latest rates and calculates the converted amount.

Currency Converter

Notes / Lessons Learned

This program did not go down without a fight. There are two main ways to fetch real-time exchange rates:
Option 1 is using https://api.exchangerate.host/convert, which is free and doesn’t need an API key. It sounded perfect. I plugged in the URL, hit run, and got… nothing. After far too much debugging, I realized the problem wasn’t the code—it was that something on my system was redirecting that link to exchangeratesapi.io, a completely different API that demands an API key. DNS goblins? Old environment settings? Ghosts of APIs past? Who knows.

So, I switched to a new free option: https://open.er-api.com. No signup, no key, and it worked like a charm. The moral of the story? Sometimes the easiest-looking door is secretly locked, and the best path forward is just to find a different door. Preferably one that doesn’t ask for your email address.

Optional Ideas for Expansion

  • Add a list of common currency codes for reference
  • Let users select currencies from a simple dropdown in a GUI version
  • Track historical exchange rates for past transactions

Why You Shouldn’t Drink a Milkshake Before a 10K

Brian’s fitness journal after a brain stroke

Today’s plan was simple and efficient: visit the running shoe store to get my wife a fresh pair of shoes, then stop for a milkshake on the way home. We had a flier for a free milkshake, so naturally, we synchronized errands like responsible adults.

My wife takes running attire very seriously—and for good reason. She firmly believes that the wrong shoes invite injury, and improper clothing invites heat stroke, hypothermia, or, at the very least, regret. I don’t argue with this logic.

While we were there, I also replaced my aging cold-weather running pants. My old pair had reached the end of their honorable service, so I upgraded. Once we got home, I immediately put the new pants on and decided to break them in properly—with a full 10K run.

We don’t go out much on her days off because she usually has a long list of chores. But she’d already declared weeks ago that her running shoes were overdue for replacement. This outing had been scheduled in the household calendar long before the milkshake entered the story.

The milkshake, however, was my personal motivation.

My wife isn’t interested in milkshakes. She always takes one sip of mine, politely declares it “too sweet,” and hands it back. I, on the other hand, was thrilled. I hadn’t had a milkshake in years. Years.

And then I made a terrible decision.

I drank the entire milkshake right before heading out for my run.

Running with a belly full of milkshake is… not ideal. No matter how delicious it is, milkshake-fueled jogging is not a performance-enhancing strategy. This is a lesson I will absolutely remember: milkshakes belong after runs, not immediately before them.

The run itself was hard. I fought to keep my pace from collapsing more than 50 seconds below my target. I finished 49 seconds under instead—which is technically better, but emotionally still rough. By the end, my legs were fully aware that I had tried very hard.

They may become even more aware tonight.

I’m considering doing my weekly squats this evening instead of tomorrow. That would give me an extra recovery day before my Monday run, which should—at least in theory—help me be faster then.

So today’s takeaways:
  • New shoes: excellent
  • New pants: promising
  • Free milkshake: delicious
  • Timing of milkshake: catastrophic

Still, lessons were learned, gear was upgraded, and the run got done.
Next time, I’ll earn my milkshake the hard way—after the finish line.

BMI: Bridging the Gap Between Kilograms and Inches

Day 34 of 100 Days Coding Challenge: Python

I built my first Flask BMI calculator back on Day 7—just me, Python, and a simple formula. It worked well for metric units, crunchiDay 34 – BMI: Bridging the Gap Between Kilograms and Inchesng the numbers in centimeters and kilograms without complaint. But today, I decided to revisit it with a friendlier approach: one that welcomes both metric and imperial users. After all, some people think in kilos, others think in pounds—and both deserve an app that meets them where they are. So, I gave it a new home in Flask and added support for both systems. A small upgrade, but a meaningful one.

Today’s Motivation / Challenge

BMI calculators are a classic beginner’s project. They’re easy to understand, quick to build, and surprisingly useful. But for me, this wasn’t just about calculating numbers—it was about building a more thoughtful, inclusive tool. Rewriting it in Flask gave me a chance to sharpen my web development skills while creating something a little more flexible and user-friendly.

Purpose of the Code (Object)


This code creates a simple web app that calculates your Body Mass Index (BMI) based on your height and weight. You can choose between metric or imperial units, and the app will give you your BMI along with a general category, like “Normal” or “Overweight.” No fuss, just quick feedback.

AI Prompt:

“Create a Flask web app that calculates BMI from user input. Include support for both metric and imperial units, and display the result with a category like ‘Normal’ or ‘Overweight’.”

Functions & Features

  • Lets users select metric (kg/cm) or imperial (lb/ft+in)
  • Accepts user input for height and weight
  • Calculates BMI using the appropriate formula
  • Categorizes results (e.g., Underweight, Normal, Overweight, Obese)

Requirements / Setup

  • pip install flask

Minimal Code Sample

if unit == “imperial”:

    total_inches = float(ft) * 12 + float(inch)

    bmi = round((float(weight_lb) / (total_inches ** 2)) * 703, 2)

else:

    height_m = float(height_cm) / 100

    bmi = round(float(weight_kg) / (height_m ** 2), 2)

// Calculates BMI based on the selected unit system.

MBI Calculator Using Flask

*** I am very sorry, I realized I forgot to add to GitHub. I uploaded later. ***

Notes / Lessons Learned


When I first started working with Flask, things got messy fast. Each new app ended up in its own makeshift folder, and before long, I discovered that Flask can be downright fussy about file locations—especially when it comes to templates. That lesson pushed me to get organized. Now, every project gets its own environment, a dedicated folder, and a clearly named app file (I’ve officially retired the one-size-fits-all “app.py”). I also learned to run multiple apps on different ports, which made testing far less chaotic. A bit of structure early on, it turns out, saves a world of confusion later.

Optional Ideas for Expansion

  • Add JavaScript to display BMI results instantly without reloading
  • Store BMI history so users can track changes over time
  • Include wellness tips based on BMI results

Flask Forward: Building a Blog From Scratch (and Mild Panic)

Day 33 of 100 days coding challenge: Python

Personal Experience

I’ve been blogging for over six years, but not like this. My usual workflow involves logging into a WordPress site, clicking “New Post,” and typing away like a caffeinated raccoon. No programming. No servers. Definitely no manually structured file trees.

Then yesterday, I discovered Flask—a micro web framework in Python—and I couldn’t resist the “Hello, World” charm offensive. Today, I took it a step further: I built a miniature blog app. Not styled. Not database-backed. But it works. I can write a post, hit submit, and watch it appear like magic (or slightly awkward sorcery). It’s not pretty—yet—but it’s mine. And honestly, playing with this new toy has me feeling like the proud owner of a digital Easy-Bake Oven. You throw in some code, and out pops a web page. Delicious.

Today’s Motivation / Challenge

I’ve used blogs for years, but never thought of building one from the ground up. Today’s challenge wasn’t just about learning Flask—it was about flipping the curtain on the software I use every day. It’s like going from “driving a car” to “building one with duct tape and curiosity.” And you know what? Turns out the engine runs just fine.

Purpose of the Code (Object)

This mini app creates a simple blogging website. You can add a new post, view all existing ones, and pretend—for just a moment—that you’re running your own minimalist content empire. It doesn’t use a database yet—just keeps your posts in memory—but it’s a great stepping stone.

AI Prompt:

Write a simple Flask app that displays blog posts and lets users add a new one through a form. Keep it minimal, with in-memory storage and two HTML templates: one for the homepage and one for the post form.

Functions & Features

  • Displays a list of all blog posts
  • Lets users create a new blog post via a form
  • Stores posts temporarily (in memory)

Requirements / Setup

pip install flask

You’ll need Python 3.6 or later. Then just run app.py and open your browser.

Minimal Code Sample

@app.route(‘/new’, methods=[‘GET’, ‘POST’])

def new_post():

    if request.method == ‘POST’:

        title = request.form[‘title’]

        content = request.form[‘content’]

        blog_posts.append({‘title’: title, ‘content’: content})

        return redirect(url_for(‘home’))

    return render_template(‘new_post.html’)

This route displays a form or saves a post, depending on the request.

Mini Blog App

Notes / Lessons Learned

When working with Flask, file structure isn’t just a “nice to have”—it’s the entire vibe. The templates folder must be in the exact same level as app.py, or Flask will act like it doesn’t know you. I spent a good hour wondering why my beautiful new form page was blank. A quick “View Page Source” revealed… nothing. That’s when I realized: I hadn’t saved the file. Turns out I’d disabled auto-save in VS Code, and my new_post.html was basically a digital tumbleweed. Once I retyped it, saved everything properly, and restarted the app, the blog sprang to life—albeit looking like a Geocities relic. But I made it. And that’s what counts.

This experience reminded me: fancy tools are fun, but building something with your own code—flaws and all—is a different kind of thrill. I’m starting to see the potential here. Flask is no longer just “that framework with a cool name”—it might be the engine behind my next real web project.

Optional Ideas for Expansion

  • Add a timestamp to each post
  • Style it with Bootstrap for instant visual credibility
  • Save posts to a text file or SQLite database so they don’t disappear on refresh

Too Cold to Run, Smart Enough to Plan Around It

Brian’s fitness journal after a brain stroke

I have been exceptionally cold in Nashville lately. We’ve had mornings starting at 11°F, which feels less like weather and more like a personal challenge from the universe.

My wife, unfazed, went out for her morning workout anyway. Her internal temperature sensor is clearly miscalibrated, I blame her time living in the frozen wastes of Canada. She claims her winter running jacket feels perfectly warm at 11°F. Apparently, such jackets exist. I have never owned one and therefore remain skeptical.

Last night, it snowed. Snow itself doesn’t concern us unless it requires manual labor. We are fully prepared—with two bags of salt and a snow shovel standing by like emergency supplies. Fortunately, the snow didn’t stick. The temperature crept above freezing just long enough to melt it away.

Unfortunately, that did not mean warmth was coming back.

Once I realized we wouldn’t see anything above 40°F, I immediately began dreading my run. Since I’ve already hit my yearly running goals, a dangerous thought appeared: Maybe I can take a break.

And just like that, I declared today a no-run day.

That said, I know the rule my wife lives by: skip once, and you must go back next time. Otherwise, skipping becomes a habit, and habits quietly erode commitment. This is probably why she still works out in conditions better suited for polar research.

I, however, have a different constraint: my body does not cope well with extreme weather. This is less a motivational issue and more a survival preference.

Looking ahead, Saturday promises temperatures in the 40s. Not pleasant—but tolerable. I’ll definitely be running a 10K then. A 10K in the 40s isn’t fun, but it’s manageable with the right layers and the correct amount of complaining.

This has led me to consider a new idea: a temperature-based exception rule.

Something like:

  • If it doesn’t get above 40°F by 1 p.m.
  • And I’ve already hit my current year’s goals
    → I’m allowed to skip the run without guilt.

I suspect this would reduce unnecessary stress and make running feel less like a punishment issued by the weather. It may also be wise to establish an upper temperature limit as well—though running early in the morning usually solves that problem.

For now, winter and I have reached a temporary ceasefire. I skipped today.
I will run next time.
And that, I think, is a reasonable compromise.

How to Build Your First Flask Web App in Python (Hello, World!)

Day 32 of 100 Days Coding Challenge: Python

Today I met Flask—and no, not the kind you sneak whiskey into conferences with. This one is a web framework, and it’s my first real step into the world of web applications. At first glance, the code looked suspiciously simple: import Flask, create an app, slap a “Hello, World!” on the screen. That’s it? Really?

But behind that humble greeting lies a whole new realm of possibilities. I’m already plotting how to use this for my future AI projects. Imagine wrapping a Python model into a sleek web interface—Flask makes that not just possible but practically inviting. For now, I’m staying in my lane and keeping it small. One “hello world” at a time. Baby steps, but hey, even Iron Man had to build his first suit in a cave.

Today’s Motivation / Challenge

Building websites sounds like something best left to Silicon Valley wizards, but today proved it doesn’t have to be. Flask gives you a gentle nudge into the web world, perfect for anyone who’s ever wanted to turn a Python script into something users can actually interact with. No dragons to slay, just a server to run.

Purpose of the Code (Object)

This little project sets up a tiny website on your computer that proudly displays “Hello, World!” when you visit it in a browser. It’s the classic starter app, but this time, you’re doing it with your own Python magic. Think of it as shaking hands with the Internet.

AI Prompt

Make a Flask app that runs a server on localhost and displays “Hello, World!” on the homepage.

Functions & Features

  • Runs a basic web server locally
  • Displays a message (“Hello, World!”) when you open the site
  • Prepares the foundation for future web-based apps

Requirements / Setup

pip install flask

Minimal Code Sample

from flask import Flask  

app = Flask(__name__)  

@app.route(‘/’)  

def hello():  

    return ‘Hello, World!’  

This sets up a web route at / and returns a greeting when accessed.

Flaskapp

Notes / Lessons Learned

This was surprisingly fun. I’ve never built a web app before, but now I’ve got a tiny server cheering me on from my browser tab. There’s a lot more to learn—routing, templates, maybe even form handling—but I already see how this can be the launchpad for my AI work. I’ve been tinkering with Python models in isolation, but now I can give them a proper front door. The best part? I didn’t need a massive framework or a team of developers. Just me, Flask, and a mildly confused browser.

Optional Ideas for Expansion

  • Change the greeting based on the time of day
  • Add a new route, like /about, to test routing
  • Connect it to an AI model that responds with something witty (or weird)

Calendar Chaos: Now Starring You

Day 31 of 100 Days Coding Challenge: Python

Back in the pre-Google-stone age, I was the kind of person who printed out monthly calendars like I was running a tiny print shop. Menu plans, exercise routines, music lessons, sports schedules—you name it, it lived on my calendar. When I was a student, if it wasn’t written down, it didn’t exist. My calendar was my brain’s external hard drive. Fast forward to my first real adult job: I marched into a store and proudly bought myself a Franklin Covey agenda. The deluxe version. It felt like holding the crown jewels of time management. I’ve always loved the feeling of flipping to a fresh week, filling it with possibility (and color-coded chaos). So, when I realized I could make my own Python calendar app from scratch? Let’s just say I had a moment. Sure, it’s not going to dethrone Google Calendar anytime soon, but it’s mine—and it doesn’t send me passive-aggressive push notifications.

Today’s Motivation / Challenge

Calendars are one of those tools we don’t think about until we need them—or lose them. Today’s project taps into the part of us that loves order, hates forgetting birthdays, and secretly dreams of color-coded to-do lists. Building a calendar app is a great way to connect programming with everyday life. Plus, who doesn’t want to click a button and feel like they’ve conquered time?

Purpose of the Code (Object)

This little app lets you view any month and year in a simple graphical layout. You can click on a day to add a note (because you will forget Aunt Susan’s birthday), and today’s date gets a nice highlight so you don’t accidentally time-travel. It’s not fancy, but it’s useful—and surprisingly satisfying.

AI Prompt: 

Add features to highlight today’s date, allow users to click on a date to add a note, and save those notes in a local file. Keep the interface clean and simple.

Functions & Features

  • View any month and year in a calendar grid
  • Highlight today’s date in green (because you deserve attention)
  • Click on a date to add a note or reminder
  • Save notes automatically in a JSON file
  • Bold and blue font indicates a note exists

Requirements / Setup

Python 3.x

No external packages required

Minimal Code Sample

btn = tk.Button(…, command=lambda d=day: self.add_note(d))

if day == today.day and month == today.month and year == today.year:

    btn.config(bg=”lightgreen”)  # Highlight today’s date

This sets up each calendar button and highlights today’s date.

Customizable Calendar

Notes / Lessons Learned

This time, I jumped right into the GUI version because—let’s be honest—it’s way more fun to see a calendar than to stare at a wall of text. At first, all it did was show the month. Cool… but also about as interactive as a printout taped to your fridge. So I started tinkering. First, I made it highlight today’s date—because every hero needs a spotlight. Then I added the ability to attach notes to specific days. Now, do those notes pop up when you hover or click? Not yet. But the font turns blue and bold, and that’s enough to make my inner calendar nerd happy. For someone who thrives on color-coding their life down to what to eat on Tuesday, this project hit all the right buttons. Literally.

Optional Ideas for Expansion

  • Add a note viewer pane to display saved events when clicked
  • Export notes as a CSV for your future time-travel journal
  • Add color tags for event types (work, personal, world domination)

Crunching Numbers with Style: My Python EMI Calculator App

Day 30 of 100 Days Coding Challenge: Python

Back in university, I survived a finance course where one of the big thrills was figuring out how much you’d owe on a mortgage—because nothing says fun like watching compound interest quietly ruin your weekend. We used financial calculators that looked like relics from a Cold War museum, and if the professor was feeling futuristic, we’d get to use Excel. These days, of course, you can find slick EMI calculators on almost every bank’s website. But today I wondered—could I make one myself? Turns out, yes. I built a simple Python EMI calculator app. It’s not glamorous, it doesn’t sparkle, and it definitely won’t win UX awards, but it works. No spreadsheets. No arcane formulas. Just pure, functional code—and the oddly satisfying thrill of watching your hypothetical loan turn into very real monthly heartbreak.

Today’s Motivation / Challenge

Ever tried to figure out how much you’re actually paying the bank for that “affordable” loan? Spoiler: it’s more than you think. Today’s challenge was a practical one—create a loan/EMI calculator to see the real cost of borrowed money. It’s part nostalgia (throwback to finance class) and part grown-up reality check. Plus, building this in Python and Streamlit let me stretch some GUI/web muscles without losing my mind.

Purpose of the Code (Object)

This code calculates your monthly loan payment (EMI), the total amount you’ll pay back, and how much of that is interest. You just punch in the loan amount, interest rate, and loan period. It does the math, so you don’t have to reach for that dusty calculator—or guess wildly.

AI Prompt: 

Create a loan/EMI calculator in Python that asks for principal, interest rate, and tenure, then calculates and displays the monthly EMI, total repayment, and total interest. Include both a Streamlit app and a Tkinter GUI.

Functions & Features

  • Takes user input for loan amount, interest rate, and tenure
  • Calculates monthly EMI using a standard financial formula
  • Displays total repayment and total interest
  • Offers both a desktop GUI and a Streamlit web app interface

Requirements / Setup

pip install streamlit

For GUI:

  • Built-in tkinter (no install required on most Python versions)

Minimal Code Sample

emi = (P * r * (1 + r)**n) / ((1 + r)**n – 1)

This formula calculates your monthly payment using principal (P), monthly interest rate (r), and loan term in months (n).

Loan Emi Calculator Streamlit

Notes / Lessons Learned


The code wasn’t hard to write. What tripped me up? Forgetting I wasn’t in Python 101 anymore—I was in Streamlit land. So when I ran it the usual way (python scriptname.py), nothing happened. No errors. Just silence. A tumbleweed moment. Then I remembered: it’s streamlit run scriptname.py. Once I got that right, the app popped open in my browser like a well-behaved web butler. Lesson learned: the right tool needs the right doorbell.

Optional Ideas for Expansion

  • Add a pie chart showing principal vs. interest breakdown
  • Allow users to export results as a CSV or PDF
  • Include an “extra payment” option to see how prepayments affect the loan term

Rebuilding My Memory System One App at a Time

Brian’s fitness journal after a brain stroke

Despite it still being cold today, it’s already less of a disaster than yesterday. A low bar—but progress is progress.

I started the day with one clear intention: to reinforce a new habit by using a new app. The motivation is painfully obvious. I’ve recently forgotten two important doctor appointments. The dentist mishap had a semi-respectable excuse (my old phone died a dramatic death), but missing my nephrologist appointment? That one was entirely on me.

Enough was enough.

The app Finch, which I decided to try, is one my wife uses regularly—and happily. She’s been using the free version for a while and swears by it. A friend of mine went all in on the premium version because he enjoys unlocking extra features. I figured starting small would be wiser. Commitment can come later.

To make the habit stick, I used a strategy that’s worked for me before: attach the new task to something I already do. This was a trick I learned in occupational therapy. When your brain has experienced trauma, memory becomes… creative. The goal isn’t to trust it—it’s to outmaneuver it.

So I decided to open the app immediately after completing my daily language lesson. I already do that lesson without fail, so it’s the perfect anchor. One task flows into the next, and suddenly the new habit doesn’t feel new at all.

I set up my task list so it aligns neatly with due dates. That way, I don’t have to hunt for what needs to be done. Small organizational tweaks make a big difference when attention is limited. Efficiency is kindness—to your future self.

I added my daily essentials first: medication, stretching, and language practice. Medication, especially, is non-negotiable in my case. Forgetting it is not an option. I also added weekly tasks—like kombucha bottling. We drink kombucha every day, so forgetting to bottle it would be… unfortunate.

With my digital life slightly more organized, I tackled the next unavoidable task: calling my doctor’s office to reschedule the appointment I missed. After a few rounds of phone tag, I finally reached the receptionist and booked a new appointment—for January.

Later than ideal? Absolutely.
Unsurprising? Also yes.

This is what happens when you miss an appointment—you go to the back of the line. While I assume my kidney function is holding steady at level four, it’s still reassuring to see the doctor regularly.

The app is still new to me, and I don’t yet know if it’s the solution. But my wife uses it. My friend uses it. I can even share progress with them, which adds a layer of accountability I probably need.

Cold weather remains.
Memory remains unreliable.
But today, at least, I built a system instead of relying on willpower.

And that already feels like a win.

Button-Free Brilliance: A Calculator That Doesn’t Judge Your Math

Day 29 of 100 Days Coding Challenge: Python

Have you ever stopped mid-calculation and thought, “Wait, how does this magic actually happen?” I mean, when I type “=SUM(A1:A5)” into Excel, I don’t pause to thank the spreadsheet gods. But today, I did. Mostly because I was tired of relying on apps, a Python calculator with history, and wanted to see if I could recreate the magic myself—with a twist. You see, I do most of my calculations on my phone or in a spreadsheet (because who has time to calculate sales tax manually?). But something about writing my own calculator in Python felt strangely empowering, like building a mini-math butler. And hey, once you’ve got this running, you can actually reuse it in all sorts of future projects. Nothing fancy—just a bit of logic, a few lines of code, and voilà: your own digital brain.

Today’s Motivation / Challenge

Today’s challenge was about demystifying the tool we all use but never think about—calculators. Behind that slick interface on your phone lies a surprisingly simple system. By building one ourselves, we not only learn how math works in Python, but we create a tool that’s instantly useful. Also, let’s be honest: there’s something satisfying about typing in 3 * (5 + 2) and seeing your own code proudly deliver the answer.

Purpose of the Code (Object)

This program lets you enter math problems (like 4 + 4 or 12 / 3) into a simple GUI window and gives you the answer. It also remembers every calculation you’ve done during that session, so you can scroll back and admire your math skills—or catch the moment it all went wrong. It’s like your phone calculator, but with less judgment and more transparency.

AI Prompt: 

Write a GUI-based calculator in Python with history tracking. It should evaluate expressions typed into an input box, display results below, and keep a scrollable history of all calculations.

Functions & Features

  • Accepts math expressions like 5 + 2 or 3 * (4 – 1)
  • Calculates and displays the result immediately
  • Keeps a scrollable history of all calculations
  • Handles syntax errors without crashing
  • Lets you clear the history with one click

Requirements / Setup

Just make sure you have Python 3 installed—nothing else needed.

# No pip install needed—just run the script

python gui_calculator_with_history.py

Minimal Code Sample

expr = entry.get().strip()

result = eval(expr, {“__builtins__”: None}, {})

This takes the user’s input, evaluates it safely as a math expression, and returns the result.

GUI Calculator with History

Notes / Lessons Learned

The program works surprisingly well—until you get cheeky. It’s text-based, which means it expects, well… math. If you type in your file name or something like >>> 2 + 2, it will blink at you and throw a syntax error. Why? Because it’s trying to evaluate whatever you typed as math. This is not a chatbot—it doesn’t care about small talk. It only wants 2+2, not your life story. So yes, it’s a bit rigid, like a teacher who only answers what’s on the test. But once you get used to that, it’s fast, reliable, and kind of fun. Also, building it made me realize just how often I rely on tools without knowing how they work under the hood. Now I do—and so do you.

Optional Ideas for Expansion

  • Add buttons for digits and operators to make it feel like a real calculator
  • Save calculation history to a .txt or .csv file
  • Add a dark mode toggle for extra flair and eye comfort