
Patrick B. answered 11/15/20
Math and computer tutor/teacher
P = 100000 # the starting principal :price of the house
MP=0 # the monthly payment
incr = 10000 #change this (make it smaller) to get more accurate precision
"""
prints table with the following three headers:
Prinicpal after 30 years interest monthly payment
"""
#adjust the spacing as needed
print('Principal after 30 years interest montly payment')
while (MP<2000):
AP = int(P)*(1.03)**30 # P(1.03)^30 in interest
MP = float(AP)/360 # divides by 360 payments
print(str(P) + ' ' + str(AP) + ' ' + str(MP))
P=int(P)+int(incr) #increases the price