Question

In python Suppose you deposit money into a savings account and let it accumulate at 4%...

In python

Suppose you deposit money into a savings account and let it accumulate at 4% interest compounded annually. Write a program, using while loop, to determine when you will be a millionaire. Take the initial balance from the user. Sample Run Enter initial deposit: 123456 In 54 years you will have a million dollars.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
//Note:- if you have any query then comment below.please upvote.use correct indentation to run the code

depostite-int (input (Enter initial deposite: )) count-0 while (depostite 1000000) interest-depostite*4/100 depostite-deposEnter initial deposite: 123456 In 54 years you will have a million dollars.

depostite=int(input("Enter initial deposite: "))
count=0
while(depostite<1000000):
    interest=depostite*4/100
    depostite=depostite+interest
    count=count+1

print("In ",count," years you will have a million dollars.");
Add a comment
Know the answer?
Add Answer to:
In python Suppose you deposit money into a savings account and let it accumulate at 4%...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT