You are on page 1of 1

print('Interest Calculator:')

amount = float(input('Principal amount ?'))

roi = float(input('Rate of Interest ?'))

yrs = int(input('Duration (no. of years) ?'))

total = (amount * pow(1 + (roi/100), yrs))

interest = total-amount

print(interest)

print(“Interest = %0.2f” %interest)

You might also like