tuition increase (python) at aone college, the tuition for a full-time student i
ID: 3676857 • Letter: T
Question
tuition increase(python)
at aone college, the tuition for a full-time student is $8000 per semister. it has been announced that the tuition will increase by 3 percent each year for the next 5 years. write a program with a loop that displays the projected semister tuition amount for the next 5 years.
note: Your program should start and be driven from a main function.
* You should have and use a function that takes in a dollar amount and a growth percentage as parameters and returns a new dollar amount that is the original dollar amount grown by a particular percentage.
* Make sure your output is rounded to two decimal points and looks like currency.
Explanation / Answer
Solution for Question:
This below python function set_tution_fee will accept two
parameters one is amount and growth and will calculate and
print the output upto two decimal positions.
def set_tution_fee(amount, growth):
for i in range(1,5):
total += amount * growth
print ("In %.2f , the tution will be ",i , total)
if __name__ == '__main__':
set_tution_fee(8000,0.03)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.