Skip to content

Enhanced Typing Speed Game with Accurate WPM and Error Detection#228

Open
MohdFuzailHaider wants to merge 2 commits intoitsmedeepak:mainfrom
MohdFuzailHaider:Typing-Speed-Game-Update
Open

Enhanced Typing Speed Game with Accurate WPM and Error Detection#228
MohdFuzailHaider wants to merge 2 commits intoitsmedeepak:mainfrom
MohdFuzailHaider:Typing-Speed-Game-Update

Conversation

@MohdFuzailHaider
Copy link
Copy Markdown
Contributor

Summary

This PR enhances the speed.py script in Project-60-Typing_speed_game to improve user experience, accuracy, and readability.

Changes Made

  • Removed unnecessary global variables for cleaner code.
  • Fixed error counting to account for all typed words, including extra words.
  • Calculated typing speed in words per minute (WPM) for accuracy.
  • Added clear output formatting with results section.
  • Implemented a retry loop so users can play multiple times without restarting.
  • Improved overall code readability and structure.

Example Run

Type the following prompt:

Python is a high-level, general-purpose programming language. Its design philosophy emphasizes...

Press Enter when ready to start...

Start typing here: Python is a high-level...

--- Results ---
Total time elapsed: 25.3 seconds
Your typing speed: 34.6 words per minute
Total errors: 3

Benefits

  • Accurate tracking of typing speed and errors.
  • More user-friendly and replayable experience.
  • Cleaner and modular code for easier maintenance and learning.

@itsmedeepak
Copy link
Copy Markdown
Owner

Good work

Impovements:
Docs → add README.md, requirements.txt, fix filename typo.

@itsmedeepak itsmedeepak closed this Oct 3, 2025
@itsmedeepak itsmedeepak reopened this Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants