27.7k views
1 vote
Design a program for Jones College. The current tuition is $12,000 per year, and tuition is expected to increase by 5 percent each year. Display the tuition amount for each year over the next five years (use a looping structure). Hint: You will need to use two assignment statements for calculating purposes. One will be an accumulating total assignment statement.

User Liane
by
7.7k points

1 Answer

1 vote

Answer:

current_tuition = 12000

for year in range(1, 6):

increase_in_tuition = current_tuition * 0.05

current_tuition += increase_in_tuition

print("The tuition amount after " + str(year) + ".year: " + str(current_tuition))

Step-by-step explanation:

*The code is in Python

Set the current tuition as 12000

Create a for loop that iterates 5 times

Inside the loop, calculate the increase in tuition. Add the increase in tuition value to the current tuition and print the current tuition.

User Jason Kao
by
8.2k points

No related questions found