Posts

Showing posts with the label interest calculator in python

Interest Payment Calculator in Python

loan = float(input("How much loan do you want? ")) duration = float(input("In how many months will you return this loan? ")) interest_rate = loan / 100 * 2 #2 pc interest for 1 month loan print(f"You took a loan of {loan} ruppees for {duration} month(s) duration.") print(f"After {duration} month(s), you will pay us {loan+interest_rate*duration} ruppees.") monthly_payment = round((loan+interest_rate*duration)/duration, 3) print(f"On monthly basis, you can pay us {monthly_payment}") # you can replace the above two lines with the following... and it will work the same # monthly_payment = (loan+interest_rate*duration)/duration # print("On a monthly basis, you can pay us %.2f" % monthly_payment)