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

The aldol condensation involves nucleophilic attack of an enolate to a carbonyl. use the pop-up menus to identify the total number of aldol products that each o
Select the correct answer from the drop-down menus.read the two excerpts. then choose the correct way to complete the sentences.in passage 1, abigail adams’s pu
Mid-Term Exam The creditor is lending part of the savings to us when we borrow money. What else must we pay to the creditor in addition to the initial loan? A.
A student is writing about the process of becoming president. Which source is most credible? an article from a government website listing the presidential requ
If it were up to me, I’d record other things. Like the time there was a freak hailstorm in the Congo and the women took it as a sign that they should rule. . .
Hummus is a dip made from chickpeas. hummus is a middle eastern dip. hummus can be made at home easily. hummus has become a popular food in many countries.combi
In The Hunger Games series, the Capitol has gone to extreme measures to keep the districts in line and to win the current war. For example, the creation of mutt
O Mr. Math S. Fun is looking for his missing pair of socks. He had 8 pairs from the beginning. 1 red pair, 3 blue pairs, 4 green pairs. He uses 7 pairs last wee
Underapplied factory overhead represents a.an unfavorable total factory overhead cost variance. b.actual factory overhead. c.a favorable total factory overhead
A gas station sells motor oil in 2-liter bottles. The gas station sold 6 bottles of oil each day for 8 days. How many liters of motor oil did the gas station se
, 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

The aldol condensation involves nucleophilic attack of an enolate to a carbonyl. use the pop-up menus to identify the total number of aldol products that each o
Select the correct answer from the drop-down menus.read the two excerpts. then choose the correct way to complete the sentences.in passage 1, abigail adams’s pu
Mid-Term Exam The creditor is lending part of the savings to us when we borrow money. What else must we pay to the creditor in addition to the initial loan? A.
A student is writing about the process of becoming president. Which source is most credible? an article from a government website listing the presidential requ
If it were up to me, I’d record other things. Like the time there was a freak hailstorm in the Congo and the women took it as a sign that they should rule. . .
Hummus is a dip made from chickpeas. hummus is a middle eastern dip. hummus can be made at home easily. hummus has become a popular food in many countries.combi
In The Hunger Games series, the Capitol has gone to extreme measures to keep the districts in line and to win the current war. For example, the creation of mutt
O Mr. Math S. Fun is looking for his missing pair of socks. He had 8 pairs from the beginning. 1 red pair, 3 blue pairs, 4 green pairs. He uses 7 pairs last wee
Underapplied factory overhead represents a.an unfavorable total factory overhead cost variance. b.actual factory overhead. c.a favorable total factory overhead
A gas station sells motor oil in 2-liter bottles. The gas station sold 6 bottles of oil each day for 8 days. How many liters of motor oil did the gas station se
, 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

The aldol condensation involves nucleophilic attack of an enolate to a carbonyl. use the pop-up menus to identify the total number of aldol products that each o
Select the correct answer from the drop-down menus.read the two excerpts. then choose the correct way to complete the sentences.in passage 1, abigail adams’s pu
Mid-Term Exam The creditor is lending part of the savings to us when we borrow money. What else must we pay to the creditor in addition to the initial loan? A.
A student is writing about the process of becoming president. Which source is most credible? an article from a government website listing the presidential requ
If it were up to me, I’d record other things. Like the time there was a freak hailstorm in the Congo and the women took it as a sign that they should rule. . .
Hummus is a dip made from chickpeas. hummus is a middle eastern dip. hummus can be made at home easily. hummus has become a popular food in many countries.combi
In The Hunger Games series, the Capitol has gone to extreme measures to keep the districts in line and to win the current war. For example, the creation of mutt
O Mr. Math S. Fun is looking for his missing pair of socks. He had 8 pairs from the beginning. 1 red pair, 3 blue pairs, 4 green pairs. He uses 7 pairs last wee
Underapplied factory overhead represents a.an unfavorable total factory overhead cost variance. b.actual factory overhead. c.a favorable total factory overhead
A gas station sells motor oil in 2-liter bottles. The gas station sold 6 bottles of oil each day for 8 days. How many liters of motor oil did the gas station se