Using python, At one college, the tuition for a full-time student is $8,000 per semester. It has...

Question:

Using python,

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% each year for the next five years.

Write a program with a loop that displays the projected semester tuition amount for the next five years as:

"for" loop and "range" function in python programming:

The "for" loop is a looping statement the repeats a set of statements or block of code statements until a specified condition is true.

The python "for" loop is as follows:

for element in string,list, tuple,set or dictionary :
         statements

The "range" function: The "range" is a python built-in function that generates a range of values from start to stop with the increment value.

The range function is as follows

range(start,stop, increment/decrement)

The "start" and "increment/decrement" is optional.

The example, range(1,6) starts from 1 and stops at 5. 6 stops value. If no increment value is given, then it takes the default value of 1.

range(1,6) run from 1,2,3,4,5 and stops at value of 6.

Answer and Explanation: 1

Become a Study.com member to unlock this answer!

View this answer

The below python program is to find the semester fee of a student whose fee value increments 3 percent for the next five years.

The semester_fee is...

See full answer below.


Learn more about this topic:

Loading...
What is Range in Math? - Definition & Meaning

from

Chapter 20 / Lesson 17
27K

Learn the range math definition & see range math examples. Also identify the range definition in algebra, the range of a set of numbers, and determine the range in math.


Related to this Question

Explore our homework questions and answers library