Question

In: Computer Science

python College is an investment. Tuition can range from $3,000 to $20,000 for a full-time student...

python

College is an investment. Tuition can range from $3,000 to $20,000 for a full-time student per semester. It seems like every year the cost continues to increase. It has been announced that the average tuition will increase by 5 percent each year for the next 4 years. To help students manage the cost of college, write a program that allows the students to input their full-time tuition cost per semester and then using a loop displays the projected semester tuition amount for the next 4 years.

Ex.

Enter the full-time student tuition per semester:
5000

  • In 1 year, the tuition will be $5250.00
  • In 2 years, the tuition will be $5512.50
  • In 3 years, …
  • In 4 years, …

when 10000

Enter the full-time student tuition per semester: - In 1 year, the tuition will be $10500.00.

-In 2 years, the tuition will be $11025.00.

In 3 years, the tuition will be $11576.25.

here is what i got

def main():

amount=5000.0

print('Enter the full-time student tuition per semester:')

for i in range(1,5):

amount=amount+(amount*0.05)

if i is 0:

print('- In '+str(i)+' year, the tuition will be $'+str((amount))+'.')

elif i is 5:

print('- In '+str(i)+' years, the tuition will be $'+str(round(amount, 2))+'2.')

else:

print('- In '+str(i)+' years, the tuition will be $'+str(round(amount,2))+'.')


if __name__=="__main__":

main()

Solutions

Expert Solution

If you need any corrections, kindly comment

Program

def main():
   
    amount=float(input('Enter the full-time student tuition per semester:'))
    for i in range(1,5):
        amount=amount+(amount*0.05)
        print('- In '+str(i)+" years, the tuition will be ${:0.2f}".format(amount))
if __name__=="__main__":

    main()

Output

Enter the full-time student tuition per semester:10000
- In 1 years, the tuition will be $10500.00
- In 2 years, the tuition will be $11025.00
- In 3 years, the tuition will be $11576.25
- In 4 years, the tuition will be $12155.06

Screenshot


Related Solutions

Using Python 3 In 2017, the tuition for a full time student in a university is...
Using Python 3 In 2017, the tuition for a full time student in a university is $6,450 per year. The tuition will be going up for the next 7 years at a rate of 3.5% per year. Write your program using a loop that displays the projected year tuition for the next 7 years. You should display the actual year (2018, 2019, through 2024) and the tuition amount per year.
10. Tuition Increase At one college, the tuition for a full-time student is $8000 per semester....
10. Tuition Increase At one college, the tuition for a full-time student is $8000 per semester. It has1 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 semester tuition amount for the next 5 years.
At one college, the tuition for a full-time student is $8,000 per semester. It has been...
At one college, the tuition for a full-time student is $8,000 per semester. 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 semester tuition amount for the next 5 years. The program should print out the result in the form In 1 year, the tuition will be $8002.3. In 2 years, the tuition will be $8103.2. In 3 years, …...
- Xavier, age 20, is a full-time college student with earned income from wages of $6,000...
- Xavier, age 20, is a full-time college student with earned income from wages of $6,000 and interest income of $1,250. Xavier's parents provide more than half of Xavier's support. Xavier's 2018 taxable income is A) $0. B) $550. C) $900. D) $6,900. - Akiko, a single taxpayer, had the following income and deductions during 2018: Salary                                                    $60,000 Interest on bank account                               500 Tax-exempt interest                                      250 Deduction for AGI                                     5,500 Itemized deductions                                14,000 Taxes withheld                                         5,500 Calculate Chris's tax liability...
A full-time student pays $8,000 per semester. It has been announced that the tuition will increase...
A full-time student pays $8,000 per semester. It has been announced that the tuition will increase by 3 percent each year for the next three years. Write a program with a loop that displays the projected semester tuition amount for the next three years. Also, provide the option to the student to calculate the tuition for another three years using the same percent increase. Please remember, if the student decides to calculate the tuition for another three years the starting...
Margo attends college and spends $10,000 for one year's tuition. If she worked a full time...
Margo attends college and spends $10,000 for one year's tuition. If she worked a full time job instead of going to school, she would earn $20,000. To an economist, Margo’s opportunity cost for one year in college is Group of answer choices a.$120,000 b.$30,000 c.$10,000 d.$20,000
Sam is a 25-year-old college student. He works full time in addition to taking a full...
Sam is a 25-year-old college student. He works full time in addition to taking a full course load. He usually eats fast-food cheeseburgers and fries in his car for lunch and a take-out pepperoni pizza right before bed. Sam has noticed that he has put on some extra weight in the past few months, and his clothes are fitting very tight. He also has been experiencing severe heartburn several nights a week. Come up with some changes that Sam can...
If an investment requiring a $20,000 initial investment is forecasted to produce income of $3,000 per...
If an investment requiring a $20,000 initial investment is forecasted to produce income of $3,000 per year for five years and will be sold at the end of year 5 for $20,000, what is its projected IRR?
A student at a junior college conducted a survey of 20 randomly selected​ full-time students to...
A student at a junior college conducted a survey of 20 randomly selected​ full-time students to determine the relation between the number of hours of video game playing each​ week, x, and​ grade-point average, y. She found that a linear relation exists between the two variables. The​ least-squares regression line that describes this relation is ModifyingAbove y with caret equals negative 0.0559 x plus 2.9289. (a) Predict the​ grade-point average of a student who plays video games 8 hours per...
A student at a junior college conducted a survey of 20 randomly selected? full-time students to...
A student at a junior college conducted a survey of 20 randomly selected? full-time students to determine the relation between the number of hours of video game playing each? week, x, and? grade-point average, y. She found that a linear relation exists between the two variables. The? least-squares regression line that describes this relation is y = -0.0503x + 2.9381. (a) Predict the grade-point average of a student who plays video games 8 hours per week. The predicted grade-point average...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT