import sys
balance=int(input("Whats your balance?"))
intrate=int(input("Whats the interestrate?"))
duration=int(input("How many years?"))
print("year     balance     interest     endbalance")
x=1
while(x<=1):
    interest=balance*intrate/100
    endbalance=balance+interest
    print("%4.0f     %4.2f     %4.2f     %4.2f     %4.2f"%(x,balance,interest,endbalance))
    balance=endbalance
    x=x+1

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: