# Arup Guha
# 9/22/2020
# Program showing the progress of paying off a loan.

# Ask the user for the loan specifics.
money = float(input("How much money do you owe, in dollars?\n"))
apr = float(input("What is the annual percentage rate of the loan?\n"))
payment = float(input("How much will you pay off each month in dollars?\n"))
months = int(input("How many months do you want to see the results for?\n"))

# Divide by 100 to make a decimal, and 12 to make monthly.
monthly_rate = apr/100/12

# Repeat payments exactly months times.
for i in range(months):

    # Add in interest.
    interest_paid = money*monthly_rate
    money = money + interest_paid

    # Make payment.
    money = money - payment

    # Print results after this month.
    print("Paid",payment,"of which",interest_paid,"was interest", end=" ")
    print("Now I owe", money)

     

    
