Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How would I make a WPM counter for my typing game?
- AboveAverageCoder
-
28 posts
How would I make a WPM counter for my typing game?
I need a variable or number that changes depending on how fast you type: Link to game https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1135256258/
- hi_bobux725
-
100+ posts
How would I make a WPM counter for my typing game?
words per minute/WPM formula:
pneumonoultramicroscopicsilicovolcanoconiosis: took 7 seconds to type so my WPM is 8
(round ((60) / (how fast you typed a word)))
pneumonoultramicroscopicsilicovolcanoconiosis: took 7 seconds to type so my WPM is 8
- Elaver_3000
-
57 posts
How would I make a WPM counter for my typing game?
This could be improved on, since it took me a very negligible amount of time to write the word “a”, which means I have a words per minute of undefined. words per minute/WPM formula:(round ((60) / (how fast you typed a word)))
pneumonoultramicroscopicsilicovolcanoconiosis: took 7 seconds to type so my WPM is 8
You should already have an implemented “words typed variable”, so you can:
set [wpm v] to ((wordstyped) / ((timer) / (60))) // Total words typed divided by the internal timer divided by 60 to get the total minutes elapsed.
- AboveAverageCoder
-
28 posts
How would I make a WPM counter for my typing game?
words per minute/WPM formula:(round ((60) / (how fast you typed a word)))
pneumonoultramicroscopicsilicovolcanoconiosis: took 7 seconds to type so my WPM is 8
How come I divide by 60?
- AboveAverageCoder
-
28 posts
How would I make a WPM counter for my typing game?
This could be improved on, since it took me a very negligible amount of time to write the word “a”, which means I have a words per minute of undefined. words per minute/WPM formula:(round ((60) / (how fast you typed a word)))
pneumonoultramicroscopicsilicovolcanoconiosis: took 7 seconds to type so my WPM is 8
You should already have an implemented “words typed variable”, so you can:set [wpm v] to ((wordstyped) / ((timer) / (60))) // Total words typed divided by the internal timer divided by 60 to get the total minutes elapsed.
Usually, a word counts as 4 - 5 letters so I thought I would divide by 4. But I have not yet implemented this in my game so it looks like this:
if <(word counter) > [4]> then
set [WPM v] to (((word counter) / (timer)) * (30))
set [word counter v] to ((word counter) mod (5))
reset timer
end
- Discussion Forums
- » Help with Scripts
-
» How would I make a WPM counter for my typing game?