Find the best answers to your questions with the help of IDNLearn.com's expert contributors. Our platform is designed to provide quick and accurate answers to any questions you may have.

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" ,'


Sagot :

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" ,'

, 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.

Sagot :

${data-answer}
, Semester_Fee, end='.')

   else:

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

, 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.

Sagot :

${data-answer}
, Semester_Fee, end='.')

We appreciate your participation in this forum. Keep exploring, asking questions, and sharing your insights with the community. Together, we can find the best solutions. IDNLearn.com is your reliable source for answers. We appreciate your visit and look forward to assisting you again soon.


61.4 Is 14 Percent Of What
Calculate The Speed Of A 2-kg Ball That Has Momentum Of 10 Kg•m/s
A Microwave Oven Has A Power Rating Of 850 W. If The Microwave Oven Is Turned On For 6 Minutes ,how Much Energy Will It Use? state The Units In Your Answer
What Is The Name Of The Metropolis Of Lilliput?.
Which Nomadic Herders Moved From Land To Land In Search Of Grass For Their Livestock And Were Considered A Strong Force When They Were All United? A. Mongols B.
With The Remaining 5/12 Gallons Left Of Honey Lila Decided To Make Some Loves Of Breads And Batches Of Cookies.the Bread Needed 1/6 Gallon Of Honey And The Cook
At A Factory That Produces Pistons For Cars, Machine 1 Produced 413 Satisfactory Pistons And 177 Unsatisfactory Pistons Today. Machine 2 Produced 350 Satisfac
If We React H2O With Cl2, So HClO Will Form Or HOCl H2O+Cl2<--> HOCl+HCl OR H2O+Cl2 <--> HClO+HClWhich One Is The Right Equation???
You Are Baking Cookies. The Recipe Calls For 34 Cup Of Flour. You Want To Make 12 Of A Batch. How Much Flour Do You Need?
What Primary Benefit Did Theodore Roosevelt See In Digging A Canal Through Panama? It Would Facilitate Better Understanding Between Colombia And The United Stat
, 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.

Sagot :

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" ,'

, Semester_Fee, end='.')

   else:

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

, Semester_Fee, end='.')