Python
Write a program that gives simple math quizzes.The program should generate and display two random numbers that areto be added, such as: ( 2 points) 247+ 129The random numbers should be generated in the range of 100-500(both inclusive).
The program should then define a function, (1 point)
findSum(num1, num2) - which accept the randomly generatednumbers as parameters and return their sum.Call the function from the main part of the program. (1point)Allow the student to enter the answer. (1 point)Compare the answer entered by the user with the value returned bythe function. (1 point)If the answer is equal to the sum returned by the function, amessage of congratulations should be displayed. (1point)If the answer is incorrect, a message showing the correct answershould be displayed. (1 point)Submit the Python file for this question.
Python Write a program that gives simple math quizzes. The program should generate and display two random numbers that a
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am