Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
year = 12
while year > 0:
monthlyInterestRate = annualInterestRate/12
minimumMonthlyPayment = monthlyPaymentRate * balance
monthlyUnpaidBalance = balance - minimumMonthlyPayment
balance = monthlyUnpaidBalance + (monthlyInterestRate * monthlyUnpaidBalance)
# print("Remaining balance: " + str(balance))
year -= 1
print("Remaining balance: " + str(round(balance, 2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment