Type Like No One’s Watching (But Save That High Score)

Day 12 of 100 Days Coding Challenge : Python

Long before I was writing Python, I was tapping away on a keyboard—but not as a programmer. Nope. I was just a kid in the ’70s with a front-row seat to the future.

My school had not one, but two full rooms of NEC computers (shout-out to NEC, Japan’s pride in beige technology). We even had an official typing class, which sounded very cool… until it started.

See, I thought I’d crush it. I played the piano from a young age, and I was confident—too confident. I figured typing would be the same thing: fingers flying, rhythm flowing, applause optional. Spoiler: it wasn’t.

Turns out, typing is hard when you don’t know where any of the keys are, and your muscle memory insists “A” should make a musical note.

Still, the basic typing program we used worked its magic, and I slowly learned my way around the keyboard. Though to this day, alphanumeric typing still trips me up (looking at you, @ and &).

But hey—nostalgia + Python = today’s challenge:

Today’s Motivation / Challenge

I wanted to recreate the magic of those old typing tutor programs—not because I needed one, but because I was curious if I could build one myself. It was part nostalgia, part challenge, and entirely satisfying to see it work. For any beginner, it’s a great way to practice coding while revisiting a skill we’ve all struggled with at some point: typing fast without panicking.

Purpose of the Code (Object)

This program is a simple typing speed test that measures how fast you can type a sentence. It starts timing when you begin typing and stops when you hit Enter. Then, it tells you how many words you typed per minute. It’s a fun way to practice your typing skills—like those old-school typing tutor programs, but one you built yourself!

AI Prompt: 

Please give me the Python code for the #Typing speed test. After the speed test, it gives you the typing speed per minute. The speed test has started button. #save the last highest score #restart button. Create in GUI.

In the code, I did not want to do it in the Python code environment; rather, I want to do it in a GUI environment. But with a GUI, I need a “Start Button”. 

Functions & Features

List the program’s main capabilities using bullet points. Keep each point brief. Focus only on the essential, core functions.

Example:

  • Calculates typing speed in words per minute
  • Starts the timer when you begin typing
  • Saves high score locally for future runs

Requirements / Setup

State any software, Python version, or libraries needed. Keep it clean and minimal.

pip install requests

Minimal Code Sample

First, we start the clock with start_time = time.time(). Think of it like shouting “Go!” at yourself before a typing race—only the stopwatch is a Python function that quietly counts milliseconds since 1970. Then comes the heart of the drama: typed_text = input(“Start typing: “). This line patiently waits while you furiously hammer out your response, possibly misspelling every third word in your panic to go fast.

Once you hit Enter, we slam the brakes with end_time = time.time(), capturing exactly how long your typing sprint lasted. And now for the moment of truth: Python does the math with print(“WPM:”, len(typed_text.split()) / ((end_time – start_time) / 60)). This gem splits your sentence into words, counts them, and divides by how many minutes you spent typing—voilà, words per minute (WPM)! It’s like a speedometer for your fingers.

And just in case the future, you forget what this code does, there’s a kind little comment: # Calculates words per minute from start to finish. Consider it the sticky note you didn’t know you’d need.

Typing Speed Test

Notes / Lessons Learned

In the code, I did not want to do it in the Python code environment; rather, I want to do it in a GUI environment. But with a GUI, I need a “Start Button”. It helps me to control when I actually started typing. 

Optional Ideas for Expansion

  • Add sound effects when the test begins and ends
  • Track accuracy by comparing typed text to the original
  • Display a leaderboard with names and scores

Leave a Reply

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