question archive Design a program for Hunterville College

Design a program for Hunterville College

Subject:Computer SciencePrice:2.87 Bought8

Design a program for Hunterville College. The current tuition is $20,000 per year, and tuition is expected to increase by 3 percent each year. Display the tuition each year for the next 10 years.

 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

Answer:

?tuition = 20000

for i in range(1, 11):

   tuition += tuition*0.03

   print("The tuition will be " + str(tuition) + " in " + str(i) + " year(s)")

Explanation:

*The code is in Python.

Set the tuition as 20000

Create a for loop that iterates 10 times

Inside the loop, add the 3 percent of the tuition to the tuition. Print the tuition and the year.