Answered step by step
Verified Expert Solution
Question
1 Approved Answer
##################################################### Please write pytests for different cases as well. Thank you Continuously Compounded Interest The formula for continously compounded interest is modeled by A =
#####################################################
Please write pytests for different cases as well. Thank you
Continuously Compounded Interest The formula for continously compounded interest is modeled by A = PeRt, where A is the amount earned, P is the principal, which is our initial investment, e is the Euler's constant, R is the annual rate of interest, and t is time in years. def compound_interest (principal, interest rate, time): - Given an initial investment (principal), return the amount earned using the formula for continously compounded interest: A = P*e**(R*t), where A = the amount earned, P = the principal (initial investment), e = the Euler's constant, R = the annual rate of interest, and t = time in years return "stub" # TODO: replace return "stub" with a correct return statement Suppose we decide to invest 50,000 dollars at the bank of CS8. The bank offers an interest rate of 8.0%. Assuming that our investment continously compounds interest, compute the amount of money earned after 10 years (use import math to be able to use math.e). As always, write pytest functions to verify that your function produces correct valuesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started