Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

⏱️ Timed Math Challenge (Python)

A fun, fast-paced Python command-line game that challenges users with 10 random math problems. See how quickly and accurately you can solve them - great for practicing arithmetic or building beginner Python skills!


🧩 Features

  • Generates random math problems using:
    • Addition (+)
    • Subtraction (-)
    • Multiplication (*)
  • Tracks the total number of attempts, including incorrect ones
  • Measures the total time taken to complete all problems
  • Validates input to ensure user enters numbers only
  • Simple, engaging feedback after each response

⚙️ How It Works

  • The game generates 10 random math problems using +, -, or *, with numbers between 2 and 12.
  • A timer starts as soon as the user presses Enter.
  • The user must solve each problem correctly to move on.
  • Each guess (correct or incorrect) is counted as an attempt.
  • After all problems are solved, the program displays: Total time taken , Total number of attempts

▶️ How to Run

  1. Clone or download this repository

  2. Open a terminal and navigate to the folder

  3. Run the script with Python:

    python timed_math_challenge.py
    

💡 Example

Press enter to start the timed math challenge.
------------------------------------
Problem #1: 4 * 7 = 29
Incorrect, try again.
Problem #1: 4 * 7 = 28
Correct!

...

------------------------------------
You finished the quiz in 34.27 seconds with 13 attempts.

🛠 Requirements

Python 3.x (No external packages needed!)


🧠 What I Learned

  • Using random to generate dynamic math problems
  • Measuring execution time with time
  • Input validation and exception handling
  • Loops, conditionals, and reusable functions

🙌 Credits

Created by Toshaksha - powered by Python and brainpower 🧠⚡

Challenge yourself. Train your brain. Beat your time!