156k views
1 vote
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.

User ZyX
by
5.4k points

1 Answer

3 votes

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)")

Step-by-step 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.

User Pavel Komiagin
by
5.5k points