write a function interest() that takes one input, a floating-point interest rate (e.g., 0.06, which corresponds to a 6% interest rate). your function should compute and return how long (in years) it will take for an investment to double in value. note: the number of years it takes for an investment to double does not depend on the value of the initial investment.

Respuesta :

Code:

def interest():

   interest_rate = 0.06

   investment = input(int('Investment: '))

   yield = 0

   year = 0

   while (yield < investment):

       year += 1

       yield  = investment * interest_rate

   print (year)

NOTE: i wrote this code assuming that the investment for the next year is the same as the first year and so forth

s, and four $3
s from a standard deck of 52 cards, forming a set of $12$ cards. You then deal all $12$ cards at random to four
Please help! I have an answer but idk if it's right so please check and tell me if I made any mistakes! Thank you!
URGENT!!!!!!! Find all seventh roots of unity and sketch them on the axes below.
Consider the difference of cubes identity: a3 − b3 = (a − b)(a2 + ab + b2). For the polynomial x3 − 64, a = and b =
In preparing a company's statement of cash flows using the indirect method, the following information is available: Net income $ 52,000 Accounts payable
Studying for an exam, Jeremy focused on the meaning of terms and tried to think of examples of concepts. What strategy was Jeremy using to help encode informati
What exactly does the 18th amendment abolish? What was the result?
Compute the (sample) variance and standard deviation of the data sample. (Round your answers to two decimal places.) −8, 2, 2, 4, 15 variance standard deviation
7 - 2x if x = -4 And show your work
PLEASE HELP ASAP RN!!!!!!