@@ 1,4 1,5 @@
-# Inspired by this: https://www.thecalculatorsite.com/articles/finance/compound-interest-formula.php
+# Compound calculator by R.
+# Formula from: https://www.thecalculatorsite.com/articles/finance/compound-interest-formula.php
import math
from datetime import date
@@ 56,6 57,6 @@ elif answer == "b":
r=float(input('The average interest rate during these years (defaults to 0.05, meaning 5%): ') or 0.05)
y = year(t)
- print("\nYou would need to invest " + str(truncate(findMonthly(m, t, r), 2)) + "€/month, then you should have " + str(m) + "€ by the year " + y + ".")
+ print("\nYou would need to invest " + str(truncate(findMonthly(m, t, r), 2)) + "€/month, then you should have " + str(m) + "€ by the year " + y + ". The interest rate by that point should give you ~" + str(truncate(interestMonthly(m, r), 2)) + "€/month." )
else:
print("You didn't choose a valid option, exiting...")