Answer to Question #305979 in Python for Pyara

Question #305979

At one college, the tuition for a full-time student is $8,000 per semester. It has been announced that the tuition will increase by percent each year for the next 5 years. Write a program with a loop that displays the projected semester tuition amount for the next 5 years. 


The program should print out the result in the form


In 1 year, the tuition will be $8002.3.

In 2 years, the tuition will be $8103.2.

In 3 years, …

In 4 years, …

In 5 years, …


(If, for example, the tuition would cost 8002.3dollars in one year, etc.)


Sample Run


In 1 year, the tuition will be $8240.0.↵ 

In 2 years, the tuition will be $8487.2.↵ 

In 3 years, the tuition will be $8741.816.↵ 

In 4 years, the tuition will be $9004.07048.↵ 

In 5 years, the tuition will be $9274.192594400001.


1
Expert's answer
2022-03-05T06:48:04-0500

you don't sum tuition_total value to tuition_total value calculated from the previous step try it on following way.

tuition_total = ((tuition * tuition_increase) + tuition) + tuition_total

or

tuition_total += (tuition * tuition_increase) + tuition

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS