fork download
  1. interest_per_year = 0.0375 # 3.75% yearly interest
  2.  
  3. # transform interest per year to interest per month
  4. interest_per_month = (interest_per_year + 1) ** (1/12) - 1
  5. print(interest_per_month)
  6. money = 0
  7.  
  8. for month in range(12*5): # for each of 12 months in each of 5 years
  9. money = money + 50 # you add 50 dollars each month
  10. money = money * (interest_per_month + 1)
  11.  
  12. print(money)
Success #stdin #stdout 0.01s 27696KB
stdin
Standard input is empty
stdout
0.003072541703255549
3298.90991339789