DragonBowl

Simple Bank Interest Calculator written in python3.11

Jan 26th, 2023
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | Source Code | 0 0
  1. def calculator ():
  2.     loan_amount=float(input("What is the amount of the loan you want to take out :"))
  3.     currency=input("What is your currency , please type in the symbol  £ , $ , €   :")
  4.     intrest1= (int(input("Precentage of interest as a number:")))
  5.     intrest_type=intrest1/100+1
  6.     length= float(input("What is the length on the loan in years :"))
  7.     intrestperannum=(loan_amount*intrest_type)-loan_amount
  8.     extra=intrestperannum*length
  9.     amount=intrestperannum*length+loan_amount
  10.     roundedamount=round(amount, 2)
  11.     roundedextra=round(extra, 2)
  12.     print("Your amount for simple interest is ",currency, roundedamount," This means that you will be paying ",currency,roundedextra,"in interest rounded up to 2 digits:")
  13. calculator()
Advertisement
Add Comment
Please, Sign In to add comment