1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Amiraneli [1.4K]
3 years ago
9

Create a program that calculates the total for a purchase at a bookstore. Put the lines of code in order to create the following

program.
Sample output:
Bookstore Calculator
Price of Book 29.99
Tax percent 8.75
Tax amount 2.63
Total amount 32.61
1. tax_amount = round(book_price *
(tax_percent / 100), 2)
2.print("Bookstore Calculator")
3. print("Tax amount: ", tax_amount)
4. tax_percent = float(input("Tax percent: "))
5. # get input from the user
6. # display a welcome message
7. total = round(book_price + tax_amount, 2)
8. print("Total amount:", total)
9. # display the results
10. book_price = float(input("Price of book: "))
11. # calculate tip and total amount
Computers and Technology
1 answer:
Bezzdna [24]3 years ago
3 0

Answer:

The correct order is:

<em># display a welcome message</em>

<em>print("Bookstore Calculator")</em>

<em># get input from the user</em>

<em>book_price = float(input("Price of book: "))</em>

<em>tax_percent = float(input("Tax percent: "))</em>

<em># calculate tip and total amount</em>

<em>tax_amount = round(book_price *(tax_percent / 100), 2)</em>

<em>total = round(book_price + tax_amount, 2)</em>

<em># display the results</em>

<em>print("Tax amount: ", tax_amount)</em>

<em>print("Total amount:", total)</em>

Explanation:

Given

The above code segment

Required

Place the code in correct order

Using the sample output as a guide:

The first output is a welcome message.

So, the first and second line of the program is:

<em># display a welcome message</em>

<em>print("Bookstore Calculator")</em>

<em />

Next, inputs for book price and tax percent.

So, the next lines are:

<em># get input from the user</em>

<em>book_price = float(input("Price of book: "))</em>

<em>tax_percent = float(input("Tax percent: "))</em>

<em />

Next, outputs for tax amount and total amount.

These outputs must first be calculated.

So, the next lines are:

<em># calculate tip and total amount</em>

<em>tax_amount = round(book_price *(tax_percent / 100), 2)</em>

<em>total = round(book_price + tax_amount, 2)</em>

<em />

Lastly, the results are printed

<em># display the results</em>

<em>print("Tax amount: ", tax_amount)</em>

<em>print("Total amount:", total)</em>

You might be interested in
How do design elements and color work together on a web page?
KiRa [710]

Answer:

The answer I believe is: 2. Both Enhance visual appeal.

Explanation:

4 0
3 years ago
Adding all the three primary colors-red, green, and blue-at maximum intensity produces the color _____, while adding any two of
zhenek [66]

Answer: White.

When adding all the three primary colors at maximum intensity, the color that will be produced is the color white. This is applicable when using the color scheme of computer programs like Adobe Photoshop, GIMP, etc. You will only get the color white when using the additive color palette in the RGB mode. If you are using the subtractive color palette in the CMYK mode, you will end up with the color black when all primary colors are at maximum intensity.

8 0
3 years ago
The four compass points can be abbreviated by single-letter strings as "N", "E", "S", and "W". Write a function turn_clockwise t
Naddik [55]

Answer:

The program code is written in the explanation.

Explanation:

def turn_clockwise(d):

if d=="N":

return "E"

elif d=="E":

return "S"

elif d=="S":

return "W"

elif d=="W":

return "N"

else:

return "None"

Output:

6 0
3 years ago
What's the best thing that's happened to you during quarantine?
Zanzabum
Getting out of quarantine
3 0
3 years ago
Read 2 more answers
Why star topology is more reliable than bus or ring topologies
Valentin [98]

Answer:

<h3><em><u>simple </u></em><em><u>ans</u></em></h3>

Explanation:

<h2><em><u>it </u></em><em><u>is </u></em><em><u>because </u></em><em><u>as </u></em><em><u>it </u></em><em><u>has </u></em><em><u>server </u></em><em><u>computer </u></em><em><u>and </u></em><em><u>no </u></em><em><u>one </u></em><em><u>are </u></em><em><u>free </u></em><em><u>as </u></em><em><u>other </u></em><em><u>topology </u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em></h2>

<h2><em><u>client </u></em><em><u>computer </u></em><em><u>should </u></em><em><u>ask </u></em><em><u>server </u></em><em><u>to </u></em><em><u>share </u></em><em><u>any </u></em><em><u>information </u></em><em><u>ideas </u></em><em><u>etc.</u></em></h2>

<em><u>this </u></em><em><u>much.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em>

<h2><em><u>follow</u></em></h2>
8 0
2 years ago
Read 2 more answers
Other questions:
  • What was the benefit of a caloytpe over a daguerreotype
    6·2 answers
  • The advantage of returning a structure type from a function when compared to returning a fundamental type is that
    5·1 answer
  • A simulation system is a technology that enables you to take over a customer’s screen, mouse, or other connected device in order
    13·1 answer
  • CLICK ME IF U DARE hehehe
    10·2 answers
  • How do I log into PGCPS?
    14·1 answer
  • A type of SDLC in which each phase has results that flow into the next phase is called the __________ model.
    8·1 answer
  • What do you notice about the cinematography
    14·1 answer
  • A boundary marks the inside and outside of a system and sets the system apart from its environment.
    11·1 answer
  • artefacto o servicio producido de manera artesanal o Industrial que puede satisfacer plenamente una necesidad o interés de la lo
    8·1 answer
  • Is jesus dead or alive
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!