Times Table Tester

Do you have a younger brother or sister who is learning their times tables? Do you think that you could do with brushing up on your tables yourself? In this assignment you are going to write a program that will test users on their knowledge of the times tables and give them a score.

Commands

Here is a reminder of the commands you might need for this task. As the course progresses, you will get fewer of these reminders.

Related Links

There is a page on random numbers and how to scale them into the right range here.

If you really want to practise your times tables, you might also like to try to the Visual Times Tables web-page that I created to help the children in my family.

Your Task

Your task is to produce a program to test people on their times tables. Your program should:

  1. ask the user ten questions at random from the times tables
  2. only ask questions from 2 x 2 up to 12 x 12 (i.e. you don't need 1 x 1 or anything bigger)
  3. keep a score of how many questions were answered correctly and give a score out of 10 at the end
  4. be clear and easy to use

The minimum output is the questions and the score, but you can add extra text to make it easy to understand.

Extension

If you found that quite straightforward, you could add some extra features. How about making sure that the user doesn't get the same question twice in a row - or twice in a set of 10 questions? What about asking if they want another go, and then comparing their score with the previous one? There are lots of things that you could add to this program.