.ZIP

This is in Python 3.4 Suppose you are asked to design a software tool that helps an elementary ....

This is in Python 3.4

Suppose you are asked to design a software tool that helps an elementary school student learn arithmetic operations. The software allows the student to select the arithmetic operation she or he wishes to study. The student chooses from a menu one of two arithmetic operations: Addition and Multiplication. Then the student is asked howmany questions would he/she like to be tested on. That number isstored in variable called n. Based on the student's choice and answer, the software tests the student with exactly n questions. If n is zero no test should be performed). For each of the n questions, two random positive one-digit integers are generated; then the student is asked to enter the answer for the arithmetic operation applied to the two numbers.

At the end, the software displays a message “Well done! Congratulations.” if at least 80% of the questions are answered correctly; if at least 60% but less than 80% of the questions is answered correctly, the program should display "Not too bad but please study and practice some more.", otherwise, the program should display "Please study more and ask your teacher for help.".

a) Implement a Python function, called, perform_test, that will execute all the arithmetic tests for a student for multiplication or addition operations. The function has two input parameters; the first one is an integer, 0 or 1, that represents the required operation (1 for multiplication and 0 for addition), the second one is a positive integer n representing the number of questions in the test. Then it gets the student to answer  n questions as follows:

1. Randomly generates two positive one-digit integers.

2. Ask the student to enter the answer for the arithmetic operation of the two numbers.

3. Checks if the result is correct. If the answer is incorrect, it provides the correct answer.

As questions are answered, the correct answers are counted. The number of correct answers is returned by the function.

b) (Outside of the function) implement the main part of the program to interact with the student to obtain the choice for either multiplication or addition and the number of questions, then call the function developed in part (a) to test the student (recall that the function returns the number of correct answers). Then print one of three possible messages to the student (“Well done! Congratulations.” or "Not too bad but please study and practice some more." or "Please study more and ask your teacher for help.", as determined by the criteria listed above)