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...


Design and write a<br>Python program that<br>gives and grades a math<br>quiz. The quiz will give 2<br>problems for each of the<br>arithmetic operations: +,<br>-, *, /, and %. First, two<br>addition problems will be<br>presented (one at a time)<br>with random numbers<br>between 1 and 20. Then<br>two subtraction problems,<br>multiplication, division and<br>modulus. For division<br>use // and do floor<br>division; for example: for<br>10//3, the answer should<br>be 3. For an example of<br>the first problem: the<br>program generates two<br>random numbers (let's say<br>num1 is 17 and num2 is<br>5), and prints out a<br>statement of the problem<br>as 17 + 5 =. The user will<br>enter a correct answer or<br>a wrong answer. If the<br>answer is correct, a<br>message will be printed<br>and one will be added to<br>the number of correct<br>answers. Then the second<br>addition problem is given<br>and checked. Next, two<br>subtraction problems will<br>be given and checked,<br>and so on. At the end of<br>10 problems, a final score<br>is printed out. The user is<br>asked if they want to<br>take another quiz.<br>

Extracted text: 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.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here