Instructions

Complete an algorithm, code and compile the following program. Save the program as mathTutor.py.

Math Tutor

You will be creating a math tutor program that can be used for young children to practice their math skills. The program will be driven by the following menu:

1. See Rules
2. Practice Math
3. Exit

If the user chooses (1) from the menu, the following rules will be displayed:

This program will help you practice your math skills.
First, you will choose Addition, Subtraction or Multiplication. Next, you will choose a level. Level 1 will give you problems with single digits and Level 2 will use two-digit numbers. Then, you will choose how many math problems you would like to complete. After you have completed all your problems, you will be given a score.
You can play as many times as you want. Have fun!!

If the user chooses (2) from the menu:

First, prompt from the following math operation menu:

1. Addition
2. Subtraction
3. Multiplication

Next, prompt from the following level menu:

1. Level One
2. Level Two

Next, prompt for the number of math problems to complete.

Next, use a loop to do the following for each problem:

  • Level One - generate two random numbers from 1 9
  • Level Two - generate two random numbers from 1 99
  • Notes : To generate random numbers, use the randint() function from the random Python Library
  • Show the math problem that corresponds with the operation that the user chose.
  • Note: If the user chose Subtraction, make sure that the larger number comes first.
  • Prompt the user for the correct answer.
  • Calculate the correct answer.
  • Compare the user's answer with the correct answer and display whether or not the user answered correctly.
  • Keep track of how many the user answers correctly.

After all problems are complete, display the number correct and the percent correct.

If the user chooses (3) from the menu, display a good bye message.

The users can play the game as many times as they wish, until they choose (3) to Exit.

Program must include:

>> Documentation at the top indicating
Filename
Name of programmer
Program description
Algorithm (using pseudocode)
>> Comments throughout the code documenting the main steps described in the algorithm.

Input Validation:

Validate that all menu choices are valid.
Validate that the number of problems the user enters is positive.

Functions:

Include at least three functions of your choice (in addition to main) .
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.