Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started