PYTHON PROGRAMMING: 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.)
HERE'S WHAT I TRIED (wont show indentations here):
Semester_Fee = 8000.0
for x in range(1, 6):
Semester_Fee = Semester_Fee + (Semester_Fee *(3/(100*1.0)))
print("In",x,"year, the tuition will be" ,'

Respuesta :

Answer:

Try :

Semester_Fee = 8000.0

for x in range(1, 6):

   import decimal

   Semester_Fee = Semester_Fee + Semester_Fee *(3/(100*1.0))

   if x==1:

       print("In",x,"year, the tuition will be" ,'

Otras preguntas

, Semester_Fee, end='.n')
BUT HERE'S WHAT IT SHOWED ME:
Expected Result:
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.
Your Code's Actual Result:
In·1·year,·the·tuition·will·be·$·8240.0.
In·2·year,·the·tuition·will·be·$·8487.2.
In·3·year,·the·tuition·will·be·$·8741.816.
In·4·year,·the·tuition·will·be·$·9004.07048.
In·5·year,·the·tuition·will·be·$·9274.1925944.

Respuesta :

${data-answer}

Otras preguntas

, Semester_Fee, end='.')

   else:

       print("In",x,"years, the tuition will be" ,'

Otras preguntas

Which organelles are found in both plant and animal cells? a. lysosomes and cell membrane b. cell membrane and vacuole c. ribosomes and mitochondria d. cytop
The fight-or-flight response in humans prepares the body to fight off or run away from a potential threat. This response results from a series of nerve and chem
A hydrocarbon molecule has seven carbon atoms in a straight chain. There is a double bond between the third carbon atom and the fourth carbon atom in the chain.
Which property primarily determines whether a giant star or a supergiant star will form? (1) mass (3) shape (2) color (4) composition
Feudalism and manorialism played an important role in western European society during the (1) medieval period (2) Pax Romana (3) Enlightenment (4) Age of Explor
What was a major effect of the Columbian exchange? (1) economic collapse in Europe (2) introduction of new food crops to Europe (3) decrease in European populat
Commodore Matthew Perry is best known for taking which action? (1) leading the British East India Company (2) rescuing Europeans during the Boxer Rebellion (3)
A beta particle may be spontaneously emitted from (1) a ground-state electron (2) a stable nucleus (3) an excited electron (4) an unstable nucleus
prices and wages should be determined by the marketplace.the author of this statement would most probably support
In Volleyball , players serve the ball to the opposing team . If the opposing team fails to hit the ball , the services is called an ace . A player's ace averag
, Semester_Fee, end='.n')
BUT HERE'S WHAT IT SHOWED ME:
Expected Result:
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.
Your Code's Actual Result:
In·1·year,·the·tuition·will·be·$·8240.0.
In·2·year,·the·tuition·will·be·$·8487.2.
In·3·year,·the·tuition·will·be·$·8741.816.
In·4·year,·the·tuition·will·be·$·9004.07048.
In·5·year,·the·tuition·will·be·$·9274.1925944.

Respuesta :

${data-answer}

Otras preguntas

, Semester_Fee, end='.')

Otras preguntas

Which organelles are found in both plant and animal cells? a. lysosomes and cell membrane b. cell membrane and vacuole c. ribosomes and mitochondria d. cytop
The fight-or-flight response in humans prepares the body to fight off or run away from a potential threat. This response results from a series of nerve and chem
A hydrocarbon molecule has seven carbon atoms in a straight chain. There is a double bond between the third carbon atom and the fourth carbon atom in the chain.
Which property primarily determines whether a giant star or a supergiant star will form? (1) mass (3) shape (2) color (4) composition
Feudalism and manorialism played an important role in western European society during the (1) medieval period (2) Pax Romana (3) Enlightenment (4) Age of Explor
What was a major effect of the Columbian exchange? (1) economic collapse in Europe (2) introduction of new food crops to Europe (3) decrease in European populat
Commodore Matthew Perry is best known for taking which action? (1) leading the British East India Company (2) rescuing Europeans during the Boxer Rebellion (3)
A beta particle may be spontaneously emitted from (1) a ground-state electron (2) a stable nucleus (3) an excited electron (4) an unstable nucleus
prices and wages should be determined by the marketplace.the author of this statement would most probably support
In Volleyball , players serve the ball to the opposing team . If the opposing team fails to hit the ball , the services is called an ace . A player's ace averag
, Semester_Fee, end='.n')
BUT HERE'S WHAT IT SHOWED ME:
Expected Result:
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.
Your Code's Actual Result:
In·1·year,·the·tuition·will·be·$·8240.0.
In·2·year,·the·tuition·will·be·$·8487.2.
In·3·year,·the·tuition·will·be·$·8741.816.
In·4·year,·the·tuition·will·be·$·9004.07048.
In·5·year,·the·tuition·will·be·$·9274.1925944.

Respuesta :

Answer:

Try :

Semester_Fee = 8000.0

for x in range(1, 6):

   import decimal

   Semester_Fee = Semester_Fee + Semester_Fee *(3/(100*1.0))

   if x==1:

       print("In",x,"year, the tuition will be" ,'

Otras preguntas

, Semester_Fee, end='.')

   else:

       print("In",x,"years, the tuition will be" ,'

Otras preguntas

, Semester_Fee, end='.')

Otras preguntas

Which organelles are found in both plant and animal cells? a. lysosomes and cell membrane b. cell membrane and vacuole c. ribosomes and mitochondria d. cytop
The fight-or-flight response in humans prepares the body to fight off or run away from a potential threat. This response results from a series of nerve and chem
A hydrocarbon molecule has seven carbon atoms in a straight chain. There is a double bond between the third carbon atom and the fourth carbon atom in the chain.
Which property primarily determines whether a giant star or a supergiant star will form? (1) mass (3) shape (2) color (4) composition
Feudalism and manorialism played an important role in western European society during the (1) medieval period (2) Pax Romana (3) Enlightenment (4) Age of Explor
What was a major effect of the Columbian exchange? (1) economic collapse in Europe (2) introduction of new food crops to Europe (3) decrease in European populat
Commodore Matthew Perry is best known for taking which action? (1) leading the British East India Company (2) rescuing Europeans during the Boxer Rebellion (3)
A beta particle may be spontaneously emitted from (1) a ground-state electron (2) a stable nucleus (3) an excited electron (4) an unstable nucleus
prices and wages should be determined by the marketplace.the author of this statement would most probably support
In Volleyball , players serve the ball to the opposing team . If the opposing team fails to hit the ball , the services is called an ace . A player's ace averag