Question: Python language for solution SECTION A: Answer all questions. Part 1 Write a program using the python programming language to satisfy all the following requirements.

 Python language for solution SECTION A: Answer all questions. Part 1Write a program using the python programming language to satisfy all the

Python language for solution SECTION A: Answer all questions. Part 1 Write a program using the python programming language to satisfy all the following requirements. (Your answer MUST provide the code and it must reproduce the output on the next page. Please use an IDE like PyCharm. You may import 'math' and 'random' only if needed.) i) Make sure you #comment your code and that your code is clear and easy to read. Your code must run with no error messages, and it should be less than 100 lines. [20] ii) The program should generate a random simple mathematics problem, one of 4 types, either addition, subtraction, multiplication, or division. [25] iii) The program should ask the user 10 random questions, printing the question number each time. [5] iv) The player has 3 lives, and it is game over when they lose all 3 lives. [5] v) The program should give the user the score out of 10 at the end. [5] vi) The addition, subtraction and multiplication question should only use numbers from 1 to 12 BUT the division question can have numbers from 1 to 144. All answers must be integers! [5] INDICATIVE DEMOSTRATION OF RUNNING THE CODE Question 1 What is 6+7? 13 CORRECT! Question 2 What is 120 / 10? > 12 CORRECT! Question 3 What is 3+7? > 10 CORRECT! Question 4 What is 12-02 CORRECT! Question 5 What is 6.3? CORRECT! Question 6 What is 49 / 7? > 7 CORRECT! Question 7 What is 25/5? > 5 CORRECT! Question 8 What is 11 - 42 WRONG! Question What is 24 / 2? > 12 CORRECT! Question 10 What is 1 + 10? > 11 CORRECT! YOU WIN! Your score is e out of 10. This is the end of the exam

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!