Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLEASE USE PYTHON AS THE LANGUAGE. Thank you! Write a program IN PYTHON that cal

ID: 3873553 • Letter: P

Question

PLEASE USE PYTHON AS THE LANGUAGE. Thank you!

Write a program IN PYTHON that calculates the total tuition a student must pay for a four-year program.
The user will enter their starting tuition for year one. For example, the user types 7500.
The user also enters the annual increase of the tuition in a fraction format. For example, 0.05 (for 5% increase). This increase is applied for years 2, 3 and 4.
The program then outputs the tuition for each year, and the total tuition for all four years.

Use variables to get the input, and other variables to hold the calculation. For example, use a variable to contain the tuition of year 2, and another variable for the tuition of year 3 and so on.

For those with programming experience, do not use loops.

It is important to: use variables to get input, think of the proper data type for each input, and produce the proper output.

Explanation / Answer

year1 = float(input("Enter starting tuition fee for year one: "))
percentage = float(input("Enters the annual increase of the tuition in a fraction format: "))
year2 = year1 + (year1 * percentage)
year3 = year2 + (year2 * percentage)
year4 = year3 + (year3 * percentage)
print("Year one tuition fee: ", year1)
print("Year two tuition fee: ", year2)
print("Year three tuition fee: ", year3)
print("Year four tuition fee: ", year4)

Output:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote