Mr. Statos's 5th grade class has just finished learning multiplication and division by 12. You want to write a program that will generate quizzes for his students that will test all four arithmetic operations - addition, subtraction, multiplication, and division.
The quiz will have 50 questions. The questions will involve the four arithmetic operations randomly. You will also generate two operands. The requirements for the operands are as follows:
Your program will number each question that it prints out. It will read the answer the user inputs. If the answer is wrong, it will print the correct answer. The program will keep a tally of how many questions the user gets correct. It will print the total score at the end.
If the user gets 46 to 50 (more than 90%) questions correct, your program will print Great Job. If the user gets 40 to 45 (80% to 90%) questions correct, your program will print Good Attempt. If the user gets less than 40 (80%) questions correct, your program will print Better effort next time.
Your program should also give the user the option of trying another quiz. If the user decides on another quiz, then a fresh quiz is generated. If the user decides to quit, then the program thanks the user for taking the quiz.
In this program, you will use all the elements of Python that we have learned so far. You will use conditionals, loops, functions, and use the random library.
Here is a sample scenario using just 10 questions. Remember in your program you will have 50 questions in the quiz:
Arithmetic Quiz 1) 18 / 8 = 2 2) 34 + 67 = 91 Wrong: 34 + 67 = 101 3) 85 - 34 = 51 4) 9 * 11 = 99 5) 73 + 68 = 141 6) 45 / 12 = 4 Wrong: 45 / 12 = 3 7) 89 - 65 = 24 8) 1 * 7 = 7 9) 75 + 33 = 108 10) 6 * 10 = 60 You got 8 out of 10 correct. Good Attempt. Do you want to take another quiz? (y/n): n Thank you for taking the quiz. Bye.