Question
Using Python 3.6.6, Design and write a Python program that gives and grades a math quiz. The quiz will give 2 problems for each of
Using Python 3.6.6, Design and write a Python program that gives and grades a math quiz. The quiz will give 2 problems for each of the arithmetic operations: +, -, *, /, and %. First, two addition problems will be presented (one at a time) with random numbers between 1 and 20. Then two subtraction problems, multiplication, division and modulus. For division use // and do floor division; for example: for 10//3, the answer should be 3. For an example of the first problem: the program generates two random numbers (let's say num1 is 17 and num2 is 5), and prints out a statement of the problem as 17 + 5 =. The user will enter a correct answer or a wrong answer. If the answer is correct, a message will be printed and one will be added to the number of correct answers. Then the second addition problem is given and checked. Next, two subtraction problems will be given and checked, and so on. At the end of 10 problems, a final score is printed out. The user is asked if they want to take another quiz.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started