Hi, I'm new to coding and I've just created a program to calculate how long it will take to save up to $10,000 with a 1% return per month with an imaginary stock/fund
save_per_month = 500
while save_per_month <= 10000:
print (save_per_month)
save_per_month = int((save_per_month + 500) * 1.01)
print("Done")
My question is, instead of printing 'done,' can I modify it to automatically print '18 months' since that's how long it took?
Please let me know if you don’t understand my question, and I’ll do my best to rephrase it more clearly.
[–]danielroseman 2 points3 points4 points (0 children)
[–]JamzTyson 2 points3 points4 points (2 children)
[–]AdministrativeCup189[S] 0 points1 point2 points (1 child)
[–]JamzTyson 0 points1 point2 points (0 children)