SA=1000.00
AI=0.12
MP=100.00
def remainb(x):
if x==0:
return 0
else:
return
x=(SA+(AI/12)*SA)-MP
for i in range(x,1000000):
x=(x+(AI/12)*x)-MP
CIwoP=(x+(AI/12)*x)-x #interest every month
ptd=MP*i#payment to date
#ptdreal=(ptd-CIwoP)
#rbal=(CIwP-ptd)
print(i)#payment no.
print(ptd)#amount paid to date
print(CIwoP)#interest for that month
print(x)#balance for each month after payment
#if rbal==0: return 0
#return
Made multiples attempts at debugging but failed repeatedly for hours. Frankly, I am stuck. If anyone can give me any advice on how to approach this problem (eg. run the loop until SA==0).
Select the correct answer from above options