Question: 4. (20 points) Implement a Python function called SimpleInterest() that takes three arguments: a. A principle amount (float) b. Interest Rate (0.0 to 100.0%

4. (20 points) Implement a Python function called SimpleInterest() that takes three

4. (20 points) Implement a Python function called SimpleInterest() that takes three arguments: a. A principle amount (float) b. Interest Rate (0.0 to 100.0% as a float) c. Time Period (integer) Your function should return the interest amount. The formula for a simple interest is (Principle InterestRate*Years)/100 If the result is an integer, the return type should be an integer. If the result is a floating point number, the return type should be a floating point number. Write a main program that requests the 3 numbers (perform error checking for input types (float vs. integer). Also in the main program you should call your defined function SimpleInterest() that takes 3 arguments and displays the result of the interest and the return type. Write your function definition in one cell and the function calling the main program below it or in a different cell in Jupyter Notebook. I will be testing this program by modifying your program that calls this function.

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 Programming Questions!