22.2k views
1 vote
Rem wap a programe using function procedure to calculate simple interest

User Shitu
by
4.2k points

1 Answer

1 vote

Answer:

The program in Python is as follows:

def interest(P,R,T):


I = P * R * T/100

return I

P = float(input("Principal: "))

R = float(input("Rate (%): "))

T = float(input("Time (years): "))

print(interest(P,R,T))

Step-by-step explanation:

Required

Simple interest program using function

This defines the function

def interest(P,R,T):

This calculates the simple interest


I = P * R * T/100

This returns the calculated interest

return I

The main begins here

These get inputs for principal, rate and time

P = float(input("Principal: "))

R = float(input("Rate (%): "))

T = float(input("Time (years): "))

This calls the interest function

print(interest(P,R,T))

User Jonathanb
by
4.7k points