Measure typing speed via ruby program

Need help with this question:

Two important attributes are discussed when discussing a person’s typing capabilities: typing speed (in words per minute) and accuracy. For this problem, you will design and write a Ruby program that gives an estimation of a user’s typing capabilities.

Write a program that, when executed, interacts with the user to determine his typing speed and prints out the following results: (i) gross WPM, (ii) net WPM and (iii) accuracy.

You can use the gets method to capture user input up to a newline. So to capture WPM and accuracy, you need to measure time, have the user type in some predefined words, and then see how much time have transpired as well as how close (Have a look at Levenshtein distance) they came to the word in question.

1 Like