Simple Interest Calculator
Easy
48
1
85.8% Acceptance
In this lab, you are required to implement a Python function named simple_interest
that calculates the simple interest given three parameters: principal, rate, and time.
Function Requirements:
- The function should take three arguments:
principal
(the initial amount of money),rate
(the interest rate in percentage), andtime
(the time period in years). - It should return the simple interest calculated using the formula:
Simple Interest = (Principal × Rate × Time) / 100
. - The returned simple interest value should be rounded to two decimal places.
Examples:
- Input:
simple_interest(23000, 4, 7)
Output:6440.00
- Input:
simple_interest(10000, 1, 10)
Output:1000.00
Your task is to write the simple_interest
function following these specifications. The lab challenges will test your function with different sets of inputs to ensure accuracy and adherence to the rounding requirement.