Welcome to the Reaction Time Tester page.
This page contains a brief description and implementation instructions for the project.
Project Description
A simple test to measure how quickly a user reacts to a signal. The program waits for a randomized short interval, then prompts the user to press Enter as soon as possible. It then calculates and displays the time between prompt and the keypress.
Project Requirements
Python 3.x (built-in time
module).
How to Run the Project
- Write a script (e.g.
reaction_test.py
) that usestime.sleep()
for a random delay andtime.time()
to record times. - Run it:
python reaction_test.py
. - After a “Get ready...” message, the program waits a few seconds and then asks you to press Enter. It will then display your reaction time in seconds.
Key Concepts Learned
- Time Module: Using
time.time()
to capture timestamps. - Random Delays: (Optional) Introduce a random
sleep
to avoid predictability. - Loops: (Optional) Repeat the test multiple times for an average.
- Conditional Messages: Giving feedback if reaction is very slow or fast (see the Instructables steps).
Possible Extensions
- Run multiple trials and compute average reaction time.
- Add a high-score or best-time tracker.
- Use GUI (e.g. with
tkinter
) for a visual stimulus. - Extend to other reaction tests (like responding to a color change).