# geek aka hostlerbetter math tutor

You are being contracted to create a math tutoring program for a local elementary school. This tutoring software should ask children which operation they would like to work on. Their choices should be as follows:

- Addition
- Subtraction
- Multiplication
- Quit Tutor

If any of the first three is selected, the user should be presented with 10 RANDOM mathematical problems from that set one at a time. At all times the student should know what question in the set he/she is working on out of 10 questions. The user should also know how many attempts he/she has taken per question. If the user answers a problem incorrectly, the user should be notified that the response is incorrect and be given multiple chances to answer the question correctly. With each incorrect answer, the attempt count should increase. In the even of a correct response, the user should be notified that the answer is correct and the next problem should appear.

Upon completion of the question set, the user should be given a report of the number of questions answered correctly and in how many attempts. The user’s grade should be calculated as (correctAnswers / NumberOfAttempts * 100). The initial menu should be re-displayed and the user given the opportunity to attempt another set of random problems from the chosen operation.

Also, write the result of the student to a file for output. This means you should ask for the student’s name prior to the menu for operation exercises. The file output should have:

- The user’s name
- The operation exercise (addition/subtraction/multiplication)
- The correct / attempts values
- The percentage points.

Even though this is inefficient and slightly wasteful, create a file for each set completion or research how to append to a file and append each set to the same file.

## Leave a Reply

Want to join the discussion?Feel free to contribute!