future_value = 0
for i in range(years):
# for i in range(months):
future_value += monthly_investment
future_value = round(future_value, 2)
# monthly_interest_amount = future_value * monthly_interest_rate
# future_value += monthly_interest_amount
# display the result
print(f"Year =
On 2022-05-24 22:14, Kevin M. Wilson via Python-list wrote:
future_value = 0
for i in range(years):
# for i in range(months):
future_value += monthly_investment
future_value = round(future_value, 2)
# monthly_interest_amount = future_value * monthly_interest_rate
# future_value +=
Try something like:
print(f"Year = {years}, Future value = {future_value}")
On Tue, 2022-05-24 at 21:14 +, Kevin M. Wilson via Python-list
wrote:
> future_value = 0
> for i in range(years):
> # for i in range(months):
> future_value += monthly_investment
> future_value = round(future_va
On 5/24/22 15:14, Kevin M. Wilson via Python-list wrote:
> future_value = 0
> for i in range(years):
> # for i in range(months):
>future_value += monthly_investment
>future_value = round(future_value, 2)
># monthly_interest_amount = future_value * monthly_interest_rate
># future_val
On 24May2022 21:14, Kevin M. Wilson wrote:
>future_value = 0
>for i in range(years):
># for i in range(months):
> future_value += monthly_investment
> future_value = round(future_value, 2)
> # monthly_interest_amount = future_value * monthly_interest_rate
> # future_value += monthly_intere
On 25May2022 00:13, Kevin M. Wilson wrote:
>Cameron, I have a misunderstanding here, the 'f-string' is used when
>the str() is not...isn't it!
No, f-strings (format strings) are just a convenient way to embed values
in a string. The result is a string.
In days of yore the common formatting met