What it shows
The program waits a random time, changes the colour, and measures how long you take to press a key. It shows how the timer block measures short intervals and how a list can store results.
The science
Reaction time is the delay between seeing something and acting on it, typically about 0.2 to 0.3 seconds for most people. The Scratch timer counts seconds since it was reset, so resetting it at the instant the colour changes and reading it at the key press gives the delay. The random wait stops the player from guessing the moment.
Materials
Cost: free. Many items come from home or from waste; spare parts such as LEDs, motors and wire are in the store.
- A computer, laptop or phone with a browser (free)
- Scratch 3 in the browser at scratch.mit.edu (free, no sign-in needed to code)
- A sprite with two costumes, red and green circles
- Five friends or family members to test
- A notebook and a pencil
Safety
This project uses safe, everyday materials. Still, read the rules below with a parent before you start.
Never use mains electricity: power models with cells, batteries or a low-voltage adapter. Sharp and hot tools, flames and lab chemicals need an adult or your teacher beside you. Keep magnets, button cells and small parts away from young children, and wash your hands after making.
All the safety rulesStep by step
8 steps. Do them in order, and test each part before you go on to the next. Write what you notice in a notebook as you go.
Paint two costumes on one sprite, a big red circle named red and a big green circle named green.
Make a variable called reaction and a list called results for all sprites.
Build: when space key pressed, switch costume to red, say Wait for green.
Add wait (pick random 2 to 5) seconds so the delay is different each time.
Add switch costume to green, then reset timer from the Sensing blocks.
Add wait until (key space pressed?) and then set reaction to (timer).
Add add (reaction) to results and say (join [You took ] (join (reaction) [ seconds])) for 3 seconds.
Test five people with three tries each and read the list; calculate the average of each person on paper.
What you should see
The circle turns green after a random wait and the program says how many seconds you took. The list collects every try so you can compare people and see that most are between 0.2 and 0.4 seconds.
Viva questions
A teacher or a judge will ask how it works. Try to answer each question before you open it, then compare.
1What is reaction time?
The time between a signal and the response to it.
2Why is the wait random?
So the player cannot guess when the colour will change.
3What does reset timer do?
It sets the timer back to zero so it counts from that moment.
4How can you make the test fairer?
Take several tries per person and use the average.
Take it further
Compare reaction time before and after 20 minutes of a video game or before and after sleep, and record the results in a table.
Change one thing, measure what happens, and add a table or chart of your readings: that is what turns a model into your own investigation.
Free ebooks for this project
Computer & office
Computer Fundamentals Study Book
The complete study notes, practice questions and glossary for Computer Fundamentals
