⌨️ TYPING RACE in Python

The same race — but the speed and accuracy are worked out in Python

← Back to Fun Time
🐍 Starting Python…
Speed
0
Accuracy
100%
Words done
0
Best WPM
0

📚 Which words?

Race on the everyday words, or practise a Classical Roots lesson. Pick one book, then tick as many lessons as you like.

⌨️ Controls

  • Just start typing — the clock starts with your first letter
  • SPACE after each word
  • BACKSPACE to fix a letter
  • ENTER a new race  •  ESC pause
  • 🎮 Xbox controller? Not this one, sorry — this game is about typing letters, and a controller has no letters on it. Every other game takes a pad.

🎯 How to play

  • Type the boxed word, then press space. Right or wrong, the race moves on.
  • Your typing turns black as it matches — and gets struck through when it does not.
  • The bar shows the minute running out.
  • The race ends after 24 words or 60 seconds, whichever comes first.

📚 Your own word lists

  • Under the board you can swap the everyday words for a Classical Roots lesson.
  • Pick one book, then tick as many lessons as you want — they all go in together.
  • The race deals from a shuffled bag, so every word in your choice gets a turn before any comes round again.
  • Your choice is remembered, so you can keep practising the same lesson.

🏆 What is a good speed?

  • A "word" means five characters — that is how typists have always counted.
  • 20 WPM is a good start. 40 is proper touch typing.
  • Accuracy beats speed: a wrong word is worth nothing at all.
  • Do not look at your hands. It feels slower and it is much faster.

🧑‍💻 This whole game is Python

There is almost no JavaScript on this page. The browser downloaded Pyodide — a complete Python interpreter compiled to WebAssembly — and then ran the .py files in funtime/pylib/. Python does the rules, the maths and the drawing.

File What it does Good functions to try re-writing
pylib/typing_rules.py The rules: matching letters and working out the speed matching_letters, submit_word, accuracy, words_per_minute
pylib/typing_draw.py Painting the page — Python calling the canvas layout_words, draw_typed, render_game
pylib/typing_web.py The glue: the keyboard and the on-screen one do_action, on_hidden_input, frame

🔍 Compare the two versions. Open lib/typing-rules.js and pylib/typing_rules.py side by side — same ideas, two languages.

🛠️ Build it yourself: Build Typing Race in Python walks you through the functions one at a time.

⚠️ If the game never starts: the page has to read its .py files, which a browser will not do for a page opened straight off your disk. Use the live site, or run python3 -m http.server in the project folder.