I am trying to get my answer to print out in 9 decimal points its currently printing over 100. How do I fix this? I've tried using the round function unsuccessfully.
import math
def apply_interest(original_amount: float, interest_rate: float) -> float:
return original_amount * (1.0 + interest_rate)
def compound_one_account(account_value: float, interest_rate: float, days: int) -> float:
for day in range(days):
print(f"Value is {account_value} on day {day}")
account_value = apply_interest(account_value, interest_rate)
def compound_two_account(account_value: float, account_value2: float, interest_rate: float, days: int) -> float:
total_account_value = account_value + account_value2
for day in range(days):
print(f"Value is {total_account_value,9} on day {day}")
total_account_value = apply_interest(total_account_value, interest_rate)
compound_one_account(5000, 0.025, 5)
compound_two_account(2500, 2500, 0.025, 5)