Question: Homework 13 b -- doubling time Doubling time is the time it takes for an investment to double in value. Write a program that calculates

 Homework 13 b -- doubling time "Doubling time" is the time

Homework 13 b -- doubling time "Doubling time" is the time it takes for an investment to double in value. Write a program that calculates the doubling time in years for an initial investment P_0 at an annual interest rate of R percent. Recall the compound interest formula: P(t)=P_0(1 + R/100)^t where R is entered as a percent by the user, for example 5%. A couple of suggestions: Set P_0 to $100 for simplicity, the initial investment doesn't affect the doubling time. Ask the user for a straight percent R. I've inserted a while loop for you but you're free to write your own. Your program should ask for an interest rate and should return the doubling time in the minimum number of whole years. Be sure to check your results against some realistic values. Save & Run Load History Show CodeLens 1 2 3 4 while B

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!