# TODO 1: Define the constants as instructed in the writeup and assign them # the correct values. INITIAL_PRINCIPAL = 10000.0 YEARS = 5 ACCOUNT_RATE_1 = 0.027 ACCOUNT_RATE_2 = 0.0268 ACCOUNT_RATE_3 = 0.0266 ACCOUNT_CMP_FREQ_1 = 1 ACCOUNT_CMP_FREQ_2 = 12 ACCOUNT_CMP_FREQ_3 = 365 # TODO 2: Implement the `amount_after_n_years` function. def amount_after_n_years(init_principal, acc_rate, acc_cmp_freq, years): n = acc_cmp_freq r = acc_rate t = years A = init_principal * (1 + r/n)**(n*t) return A # TODO 3: Define the 3 `amount_*` variables and assign them the values as # instructed in the writeup. c1 = 10000 * (1 + 0.027) ** 5 c2 = 10000 * (1 + 0.0268 / 12) ** (5 * 12) c3 = 10000 * (1 + 0.0266 / 365) ** (5 * 365) def main(): print(c1, c2, c3) print(max(c1, c2, c3)) amount_1 = amount_after_n_years(INITIAL_PRINCIPAL, ACCOUNT_RATE_1, ACCOUNT_CMP_FREQ_1, YEARS) amount_2 = amount_after_n_years(INITIAL_PRINCIPAL, ACCOUNT_RATE_2, ACCOUNT_CMP_FREQ_2, YEARS) amount_3 = amount_after_n_years(INITIAL_PRINCIPAL, ACCOUNT_RATE_3, ACCOUNT_CMP_FREQ_3, YEARS) if __name__ == "__main__": # TODO 4: Follow the instructions in the writeup to comment out the two # print statements and uncomment the remaining lines of the code # block. main() # print(f"Account option 1 will hold ${amount_1:,.2f}.") # print(f"Account option 2 will hold ${amount_2:,.2f}.") # print(f"Account option 3 will hold ${amount_3:,.2f}.") # print(f"The maximum amount that can be reached is " # f"${max(amount_1, amount_2, amount_3):,.2f}.") print("After {} years, the initial principal of {:.2f} in account 1 with an interest rate of {} compounded {} times per year would grow to {:.2f}.".format(YEARS, INITIAL_PRINCIPAL, ACCOUNT_RATE_1, ACCOUNT_CMP_FREQ_1, amount_1)) print("After {} years, the initial principal of {:.2f} in account 2 with an interest rate of {} compounded {} times per year would grow to {:.2f}.".format(YEARS, INITIAL_PRINCIPAL, ACCOUNT_RATE_2, ACCOUNT_CMP_FREQ_2, amount_2)) print("After {} years, the initial principal of {:.2f} in account 3 with an interest rate of {} compounded {} times per year would grow to {:.2f}.".format(YEARS, INITIAL_PRINCIPAL, ACCOUNT_RATE_3, ACCOUNT_CMP_FREQ_3, amount_3)) Submission log file: [ERROR] 2023-02-25 GMT-0500 08:21:50.778: An unexpected error has occurred. Traceback (most recent call last): File "<string>", line 74, in run File "<string>", line 31, in generate_submission_archive File "<string>", line 51, in __list_files_for_submission File "<string>", line 65, in __generate_task_specific_files File "<string>", line 138, in task3 File "<string>", line 24, in silent_import File "<string>", line 22, in silent_import File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_l.