Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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