Question: 3. Create a custom Python module named arithmetic.py. This module must contain four functions as follows: total that takes two numbers as arguments and prints

3. Create a custom Python module named arithmetic.py. This module must contain four functions as follows: total that takes two numbers as arguments and prints their sum accurate to one decimal place. difference that takes two numbers as arguments and prints their positive difference accurate to one decimal place. product that takes two numbers as arguments and returns their product. quotient that takes two numbers as arguments and returns the quotient of the first argument divided by the second argument. Write a program named program5_3.py that imports the arithmetic module, prompts the user to enter two numbers, and tests all four methods in the module.The numbers entered should be type float. The main function should print the values returned by the product and quotient functions accurate to two decimal places. SAMPLE OUTPUT Enter a number 2.5 Enter another number 5 The total is 7.5 The difference is 2.5 The product is 12.50 The quotient is 0.50

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!