Question: NEED HELP ASAP PLEASE!!! Should be done in Python! SUBMISSION INSTRUCTIONS Submit 2 python files using the naming convention below (replace JaneDoe with your first

NEED HELP ASAP PLEASE!!! Should be done in Python!

NEED HELP ASAP PLEASE!!! Should be done in Python! SUBMISSION INSTRUCTIONS Submit

2 python files using the naming convention below (replace JaneDoe with your

SUBMISSION INSTRUCTIONS Submit 2 python files using the naming convention below (replace JaneDoe with your first and last name respectively): - formulas.py - JaneDoe3_1.py QUESTION 1. Create a module named formulas that contains the functions below: a. def add(values): This function should return the sum of all the numbers in the list values. b. def subtract(values): This function should return the difference of all the numbers in the list values. c. def multiply(values): This function should return the product of all the numbers in the list values. d. def divide(values): This function should return the result of dividing all the numbers in the list values. If the first number is 0 the result should be 0 but if any of the other numbers are 0 , use the sys.exit method to stop the program and display the exit message Cannot divide by 0 . SAMPLE OUTPUT Need to provide the operator name PS C: \Users\Owora\Desktop\Python> python JaneDoe3_1.py add Need to provide at least two values PS C: \Users\Owora\Desktop\Python> python JaneDoe3_1.py add 12 Answer =3.00 PS C: \Users\Owora\Desktop\Python> python JaneDoe3_1.py subtract 123 Answer =4.00 Answer =0.00 Answer =0.50 Answer =0.00 PS C: \Users\Owora\Desktop\Python> python JaneDoe3_1.py divide 1002 Cannot divide by 0 PS C: \Users\Owora\Desktop\Python> python JaneDoe3_1.py divide 1023 Answer =1.67 PS C: \Users\Owora\Desktop\Python> python JaneDoe3_1.py test 234 Valid operator names (add, subtract, multiply, divide)

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!