Discover how IDNLearn.com can help you learn and grow with its extensive Q&A platform. Discover detailed and accurate answers to your questions from our knowledgeable and dedicated community members.

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

Your participation means a lot to us. Keep sharing information and solutions. This community grows thanks to the amazing contributions from members like you. Find reliable answers at IDNLearn.com. Thanks for stopping by, and come back for more trustworthy solutions.


, 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}
We value your participation in this forum. Keep exploring, asking questions, and sharing your insights with the community. Together, we can find the best solutions. For dependable and accurate answers, visit IDNLearn.com. Thanks for visiting, and see you next time for more helpful information.


, Semester_Fee, end='.')

   else:

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

We value your participation in this forum. Keep exploring, asking questions, and sharing your insights with the community. Together, we can find the best solutions. Find precise solutions at IDNLearn.com. Thank you for trusting us with your queries, and we hope to see you again.


Which Inequality Best Models The Situation If Variable H Is The Number Of Hours Miguel Could Practice The Piano Each Week? Miguel's Goal Is To Practice The Pian
Bart Practices His Trumpet 1 1/4 Hours Each Day. How Many Hours Will He Practice In 6 Days?
A Sample Of Fruit Juice Is Found To Have A Hydrogen Ion Concentration Of 2.87 X 10^-4 What Would The PH Be ?
What Is The Sum Of 3/10 And 68/100
Please Help How Much Heat Does It Take To Raise The Temperature Of 9.0 Kg Of Wood From 12C To 97C? The Specific Heat Of Wood Is 1.68 KJ/(kgC). Use Q = Mc(Tf - T
If The Probability Of Rain Tomorrow Is 0.27, What Is The Probability That It Will Not Rain
What Was Khrushchev's View Of US Actions? According To Khrushchev What Would Happen?
What Was A Major Contributor To Unrest In Nigeria? its Many Ethnicities And Religions a Series Of Military Dictatorships an Economic Dependence On Oil clashes W
Three Vertices Of A Rectangle Have Coordinates (–3, 1), (7,1), And (7, –4). What Are The Coordinates Of The Fourth Vertex Of The Rectangle? A. (–3, –4) B. (–3,
Which Owner Of A Small Oil Refinery Eventually Put His Competitors Out Of Business And Made His Company, Standard Oil, Very Large And Very Rich? A. Joseph Pulit
, 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}
We value your participation in this forum. Keep exploring, asking questions, and sharing your insights with the community. Together, we can find the best solutions. Your search for solutions ends at IDNLearn.com. Thank you for visiting, and we look forward to helping you again.


, Semester_Fee, end='.')

Thank you for using this platform to share and learn. Don't hesitate to keep asking and answering. We value every contribution you make. For dependable and accurate answers, visit IDNLearn.com. Thanks for visiting, and see you next time for more helpful information.


Which Inequality Best Models The Situation If Variable H Is The Number Of Hours Miguel Could Practice The Piano Each Week? Miguel's Goal Is To Practice The Pian
Bart Practices His Trumpet 1 1/4 Hours Each Day. How Many Hours Will He Practice In 6 Days?
A Sample Of Fruit Juice Is Found To Have A Hydrogen Ion Concentration Of 2.87 X 10^-4 What Would The PH Be ?
What Is The Sum Of 3/10 And 68/100
Please Help How Much Heat Does It Take To Raise The Temperature Of 9.0 Kg Of Wood From 12C To 97C? The Specific Heat Of Wood Is 1.68 KJ/(kgC). Use Q = Mc(Tf - T
If The Probability Of Rain Tomorrow Is 0.27, What Is The Probability That It Will Not Rain
What Was Khrushchev's View Of US Actions? According To Khrushchev What Would Happen?
What Was A Major Contributor To Unrest In Nigeria? its Many Ethnicities And Religions a Series Of Military Dictatorships an Economic Dependence On Oil clashes W
Three Vertices Of A Rectangle Have Coordinates (–3, 1), (7,1), And (7, –4). What Are The Coordinates Of The Fourth Vertex Of The Rectangle? A. (–3, –4) B. (–3,
Which Owner Of A Small Oil Refinery Eventually Put His Competitors Out Of Business And Made His Company, Standard Oil, Very Large And Very Rich? A. Joseph Pulit
, 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" ,'

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 committed to providing the best answers. Thank you for visiting, and see you next time for more solutions.


, Semester_Fee, end='.')

   else:

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

Your engagement is important to us. Keep sharing your knowledge and experiences. Let's create a learning environment that is both enjoyable and beneficial. IDNLearn.com is your reliable source for accurate answers. Thank you for visiting, and we hope to assist you again.


, Semester_Fee, end='.')

Your engagement is important to us. Keep sharing your knowledge and experiences. Let's create a learning environment that is both enjoyable and beneficial. For dependable answers, trust IDNLearn.com. Thank you for visiting, and we look forward to assisting you again.


Which Inequality Best Models The Situation If Variable H Is The Number Of Hours Miguel Could Practice The Piano Each Week? Miguel's Goal Is To Practice The Pian
Bart Practices His Trumpet 1 1/4 Hours Each Day. How Many Hours Will He Practice In 6 Days?
A Sample Of Fruit Juice Is Found To Have A Hydrogen Ion Concentration Of 2.87 X 10^-4 What Would The PH Be ?
What Is The Sum Of 3/10 And 68/100
Please Help How Much Heat Does It Take To Raise The Temperature Of 9.0 Kg Of Wood From 12C To 97C? The Specific Heat Of Wood Is 1.68 KJ/(kgC). Use Q = Mc(Tf - T
If The Probability Of Rain Tomorrow Is 0.27, What Is The Probability That It Will Not Rain
What Was Khrushchev's View Of US Actions? According To Khrushchev What Would Happen?
What Was A Major Contributor To Unrest In Nigeria? its Many Ethnicities And Religions a Series Of Military Dictatorships an Economic Dependence On Oil clashes W
Three Vertices Of A Rectangle Have Coordinates (–3, 1), (7,1), And (7, –4). What Are The Coordinates Of The Fourth Vertex Of The Rectangle? A. (–3, –4) B. (–3,
Which Owner Of A Small Oil Refinery Eventually Put His Competitors Out Of Business And Made His Company, Standard Oil, Very Large And Very Rich? A. Joseph Pulit