Question

Python, please help At one college, the tuition for a full-time student is $8,000 per semester....

Python, please help

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, …
In 4 years, …
In 5 years, …

(If, for example, the tuition would cost 8002.3 dollars in one year, etc.)

SAMPLE RUN #0: python3 TuitionIncrease.py

Interactive SessionStandard Error (empty)Standard Output Hide Invisibles

Highlight: NoneStandard Input OnlyPrompts OnlyStandard Output w/o PromptsFull Standard OutputAllShow Highlighted Only

In·1·year,·the·tuition·will·be·$8240.0.↵
In·2·years,·the·tuition·will·be·$8487.2.↵
In·3·years,·the·tuition·will·be·$8741.816.↵
In·4·years,·the·tuition·will·be·$9004.07048.↵
In·5·years,·the·tuition·will·be·$9274.192594400001.↵
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hello, here is the completed code you wanted. Every important statement is explained using comments. Please check and let me know if you have any doubts. Thanks.

CODE

#starting fee
tuitionfee = 8000

#loop for increase tuition fee
for i in range (5):
   #calculating tuition fee for each year
   tuitionfee = tuitionfee + (tuitionfee * 0.03)
  
   #printing tuition fee for each year
   print("In " + str(i + 1) + " year, the tuition fee will be " + "{0:.1f}".format(tuitionfee))

OUTPUT

CODE SCREEN SHOT

Add a comment
Know the answer?
Add Answer to:
Python, please help At one college, the tuition for a full-time student is $8,000 per semester....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write the pseudocode. At one college, the tuition for a full-time student is $6,000 per semester....

    Write the pseudocode. At one college, the tuition for a full-time student is $6,000 per semester. It has been announced that the tuition will increase by 2 percent each year for the next five years. Design a program with a loop that displays the projected semester tuition amount for the next five years.

  • (**IN PYTHON**) In 2019, the tuition for a full time student is $7,180 per semester. The...

    (**IN PYTHON**) In 2019, the tuition for a full time student is $7,180 per semester. 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 semester tuition for the next 7 years. You may NOT hard code each years tuition into your program. Your program should calculate the tuition for each year given the starting tuition in 2019 ($7, 180) and the...

  • This is an Introduction to Programming Course It is in Python 3. At one college, the...

    This is an Introduction to Programming Course It is in Python 3. 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 $8240.0....

  • Python Please help Write a program that asks the user to enter a number of seconds...

    Python Please help Write a program that asks the user to enter a number of seconds and then prints the same amount of time in days, hours, minutes, and seconds. For example, 3667 seconds is equivalent to 0 days, 1 hour, 1 minute, and 7 seconds. Print out the result in the format: "0 day(s), 1 hour(s), 1 minute(s), and 7 second(s)." SAMPLE RUN #4: python3 TimeCalculator.py Interactive SessionStandard InputStandard Error (empty)Standard Output Hide Invisibles Highlight: NoneStandard Input OnlyPrompts OnlyStandard...

  • A cookie recipe calls for the following ingredients: • 1.5 cups of sugar • 1 cup...

    A cookie recipe calls for the following ingredients: • 1.5 cups of sugar • 1 cup of butter • 2.75 cups of flour The recipe produces 48 cookies with this amount of ingredients. Write a program that asks the user how many cookies they want to make and then displays the number of cups of each ingredient needed for the specified number of cookies in the following format: You need 5 cups of sugar, 3 cups of butter, and 7...

  • I need the pseudocode and python for the four attached problems: 1. (Chapter 5 - For...

    I need the pseudocode and python for the four attached problems: 1. (Chapter 5 - For Loop) Logic Technical College has a current tuition of $10,000 per year. Tuition is scheduled to increase by 5% each year. Using a FOR loop, design a program that calculates and displays the tuition each year for the next ten years, like so: The tuition for year 1 will be: 10500.00 The tuition for year 2 will be: 11025.00 ……….. (You, of course will...

  • Python please help! Thanks you Write a code to get an unlimited number of grades from...

    Python please help! Thanks you Write a code to get an unlimited number of grades from the user (the user can press enter to finish the grades input, or use a sentinel, for example-1), and then calculate the GPA of all the grades and displays the GPA To do this you might need some help. Try to follow the following process (and check your progress by printing different values to make sure they are as they supposed to be): 1-...

  • i need help on question 3 to 22 please. Midterm ex review. MATH 101 Use the...

    i need help on question 3 to 22 please. Midterm ex review. MATH 101 Use the following information to answer the next four exercises. The midterm grades on a chemistry exam, graded on a scale of 0 to 100, were: 62, 64, 65, 65, 68, 70, 72, 72, 74, 75, 75, 75, 76,78, 78, 81, 82, 83, 84, 85, 87, 88, 92, 95, 98, 98, 100, 100,740 1. Do you see any outliers in this data? If so, how would...

  • Future Time Orientation and Condom Use for AIDS Prevention Background Notes: Researchers administered questionnaires to male college students taking an introductory psychology course. Among ot...

    Future Time Orientation and Condom Use for AIDS Prevention Background Notes: Researchers administered questionnaires to male college students taking an introductory psychology course. Among other things, they measured future time orientation defined as planning ahead for future events and willingness to delay gratification. (Sample item: “I believe that a person’s day should be planned ahead.”) Based on the scores on the future time orientation scale, they split the male students into two groups – one low in future orientation and...

  • Hi, i just need the highlighted ones. Thank you! CHAPTER 1 Understanding Personal Finance 33 LET'S...

    Hi, i just need the highlighted ones. Thank you! CHAPTER 1 Understanding Personal Finance 33 LET'S TALK ABOUT IT 1. Economic Growth. What tpes of federal government Federal Reserve. Describe some economic circumstances that might persuade the Federal Reserve to lower short-term inter- ctfoets to help stimulate economic growth affect 2 The Business Cycle. Where is the United States in the economic cycle now, and where does it seem to be heading? List some indicators that suggest in which direction...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT