Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elements Of Chemical Reaction Engineering

Authors: H. Fogler

6th Edition

013548622X, 978-0135486221

More Books

Students also viewed these Programming questions

Question

Calculate SE ( p ) for n=100 and the values of p given 16. p=.01

Answered: 1 week ago