Create custom python module named arithmeticpy this module


Create custom Python module named arithmetic.py. This module must contain four functions as follows:

  • totalthat takes two numbers as arguments and prints their sum accurate toonedecimal place.
  • differencethat takes two numbers as arguments andprintstheirpositivedifference accurate toonedecimal place.
  • productthat takes two numbers as arguments andreturnstheir product.
  • quotientthat takes two numbers as arguments andreturnsthe quotient of the first argument divided by the second argument.

Write program that named program53.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

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create custom python module named arithmeticpy this module
Reference No:- TGS02511716

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)