python program to calculate simple interest with function
Answers
Answered by
1
Answer:
def si(p,r,t):
si = (p*r*t)/100
return si
p = int(input("enter principle: "))
r = int(input("enter rate: "))
t = int(input("enter time(in yrs.): "))
k = si(p,r,t)
print("Simple interest for the above parameters is:",k)
hope this helps
mark this as brainliest :)
Answered by
1
Answer:
# Python program to find simple interest
# store the inputs
P = float(input('Enter principal amount: '))
R = float(input('Enter the interest rate: '))
T = float(input('Enter time: '))
# calculate simple interest
SI = (P * R * T) / 100
# display result
print('Simple interest = ',SI )
print('Total amount = ',( P + SI ))
Enter principal amount: 1000
Enter the interest rate: 5
Enter time: 10
Simple interest = 500.0
Total amount = 1500.0
Similar questions