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
An online museum is creating a site hosting hundreds of thousands of digital representations of art from around the world. The w
Firdavs [7]

Answer:

A. the museum can choose a heuristic approach which will achieve a lossless compression, but they cannot be sure that it is the most efficient compression for each image

C. algorithms for lossless compression exist, so the museum can use those to compress the image

Explanation:

4 0
3 years ago
What are the benefits of transferable skills check all the boxes that apply
Nonamiya [84]

Answer:

They allow easy cross-company transfers.

They help a person develop self-esteem.

They open up a variety of employment options.

Explanation:

7 0
4 years ago
Read 2 more answers
Print Job Cost Calculator (10 points)
Ad libitum [116K]

Answer: Provided in the explanation section

Explanation:

Provided is the code  to run this program

Source Code:

import java.util.Scanner;

class PrintJobCost

{

  public static void main(String[] args) {

      Scanner input=new Scanner(System.in);

      System.out.print("Enter print job info:");

      String info=input.nextLine();

      String size="",type="";

      int count=0,i=0,len=info.length();

      double cost=0.0;

      while(info.charAt(i)!=' '){

          size=size+info.charAt(i);  

          i++;

      }

      i++;

      while(info.charAt(i)!=' '){

          type=type+info.charAt(i);

          i++;

      }

      i++;

      while(i<len){

          count=count*10+Integer.parseInt(String.valueOf(info.charAt(i)));

          i++;

      }

      if(size.equals("Letter"))

          cost=cost+0.05;

      else if(size.equals("Legal"))

          cost=cost+0.06;

      else if(size.equals("A4"))

          cost=cost+0.055;

      else if(size.equals("A5"))

          cost=cost+0.04;

      if(type.equals("Grayscale"))

          cost=cost+0.01;

      else if(type.equals("Colored"))

          cost=cost+0.10;

      cost=cost*count;

      System.out.printf("print job Cost:$ %.2f\n",cost);

  }

}

cheers i hope this helped !!!

8 0
4 years ago
A _________ level breach of security could cause a significant degradation in mission capability to an extent and duration that
castortr0y [4]

Answer:

Moderate.

Explanation:

A breach of security can be defined as any incident which results in an unauthorized access or privileges to a network, computer, software application, classified informations or data and services. There are three (3) levels of impact on an individual or organization when there's a breach of security; low, moderate and high.

A moderate level breach of security could cause a significant degradation in mission capability to an extent and duration that the organization is able to perform its primary functions, but the effectiveness of the functions is significantly reduced. It causes a serious adverse effect on individuals, employees or organizational assets and operations.

<em>However, in order to prevent a breach of security, it is advisable to use the following programs: firewall, demilitarized zone (DMZ), Intrusion Detection Systems (IDS) and Intrusion Prevention Systems (IPS) etc. </em>

8 0
4 years ago
What Jim Crow law did Eleanor Roosevelt break?
Semenov [28]

Answer: Racial segregation laws

Explanation:

6 0
3 years ago
Other questions:
  • Since the password includes all four types of characters (complex password) and is 8 characters long, what is the real reason th
    10·1 answer
  • ____ are systems in which queues of objects are waiting to be served by various servers
    5·1 answer
  • Spreadsheet software creates a ____, composed of a grid of columns and rows
    6·1 answer
  • Como hacer una pagina web
    15·1 answer
  • On Windows computers, applications from Microsoft will not look and act the same as windows and menus from the operating system.
    8·2 answers
  • What determines gravitational pull?<br><br> volume<br><br> mass<br><br> the sun<br><br> acceleration
    9·2 answers
  • Hazel has just finished adding pictures to her holiday newsletter. She decides to crop an image. What is cropping an image?
    10·1 answer
  • Free 35 points!!!
    11·2 answers
  • How are programs and algorithms related? A program is a part of an algorithm. They are not connected at all. An algorithm is a p
    12·1 answer
  • Frankie used the ps command to find the process id of an application that he needs to stop. What command-line tool should he use
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!