Answered You can hire a professional tutor to get the answer.

QUESTION

Write a program that generates a series of random equations and prompts the user to answer each equation generated.

Write a program that generates a series of random equations and prompts the user to answer each equation generated. The program should keep track of each equation and whether or not the equation was answered correctly. If an equation is generated that has already been presented to the user, the program should check if the equation was previously answered correctly. If it was answered correctly, the equation should be ignored and a new equation generated. If the equation was not answered correctly, the user should be prompted to answer it.

The program should implement 4 levels of difficulty based on the range of operands that can be generated at each level.

  • Level 1: 0 - 10
  • Level 2: 0 - 25
  • Level 3: 10 - 25
  • Level 4: -25 - 25

The program should begin at Level 1. After ten (10) equations in a row have been answered correctly, the program should prompt the user with the following list of options:

  1. Continue at the current level.
  2. Go to the next level.
  3. Display summary statistics for the current level.
  4. Quit.

If the user chooses to continue at the current level, the program should continue generating equations until the user correctly answers in a row the next ten (10) equations generated and then follow with the menu options. If the user chooses to increase the level, the minimum and maximum range should be updated accordingly and the program should continue to generate equations. If the user chooses to see summary statistics, the program should display the following information:

  • % of addition equations correctly answered,
  • % of subtraction equations correctly answered,
  • % of multiplication equations correctly answered,
  • % of division equations correctly answered

at the current level. The user should then be presented with the menu options again and proceed accordingly. 

Note that when calculating the summary statistics an equation generated a second time should only be included in the summary if the equation was answered incorrectly previously and the user prompted to answer again.

If the user chooses to quit the program, the program should display summary statistics for each of the levels the game was played on and exit politely. 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question