maynul67

compound interest calculator

Jul 12th, 2021
884
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def comp_interest(p,r,n):
  2.     interest = p*(1+r/100)**n-p
  3.     return interest
  4. p = float(input("enter principle: "))
  5. r = float(input("enter rate: "))
  6. n = int(input("enter time in year: "))
  7. a = comp_interest(p,r,n)
  8. print(a)
RAW Paste Data