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
Nikolay [14]
2 years ago
13

company gives the following discount if you purchase a large amount of supply. Units Bought Discount 10 - 19 20% 20 - 49 30% 50

- 99 35% 100 40% If each item is $4.10. Create a program that asks the user how many items they want to buy, then calculates the pre-discount price, the amount of discount and the after discount price. So for example if order 101 items, I should see something similar to the following: With your order of 101 items, the total value will be $414.10 with a discount of $165.64 for a final price of $248.46. Your output should be very well organized, and use the correct formatting. (Including precision)
Computers and Technology
1 answer:
ratelena [41]2 years ago
3 0

Answer:

In Python:

order = int(input("Order: "))

discount = 0

if(order >= 10 and order <20):

    discount = 0.20

elif(order >= 20 and order <50):

    discount = 0.30

elif(order >= 50 and order <100):

    discount = 0.35

elif(order >= 100):

    discount = 0.40

price = order * 4.1

discount = discount * price

print("With your order of "+str(order)+" items, the total value will be $"+str(round(price,2))+" with a discount of $"+str(round(discount,2))+" for a final price of $"+str(round((price-discount),2)))

Explanation:

This prompts the user for number of orders

order = int(input("Order: "))

This initializes the discount to 0

discount = 0

For orders between 10 and 19 (inclusive)

if(order >= 10 and order <20):

-----------discount is 20%

    discount = 0.20

For orders between 20 and 49 (inclusive)

elif(order >= 20 and order <50):

-----------discount is 30%

    discount = 0.30

For orders between 50 and 99 (inclusive)

elif(order >= 50 and order <100):

-----------discount is 35%

    discount = 0.35

For orders greater than 99

elif(order >= 100):

-----------discount is 40%

    discount = 0.40

This calculates the total price

price = order * 4.1

This calculates the pre discount

discount = discount * price

This prints the report

print("With your order of "+str(order)+" items, the total value will be $"+str(round(price,2))+" with a discount of $"+str(round(discount,2))+" for a final price of $"+str(round((price-discount),2)))

You might be interested in
A student is curious about how a Web site appears on his computer screen. On a piece of paper,
nata0808 [166]

A student is curious about how a Web site appears on his computer screen. There is a communication between the client and the server in the Application Layer.

Explanation:

  • When we choose to open a webpage (in any browser) the seventh layer of the OSI model - called Application layer will help to do that.
  • What happens after we write the webpage address in address bar is that the Application layer protocol (also called HTTP) formats and sends the request from the client's browser (Internet Explorer, Mozilla Firefox , Opera, Safari etc.) to the server.
  • It also formats and sends the server's respond back to client's browser. This process happens very fast and all the OSI model layers are processing in it (not only the Application layer).
  • All the layers are working together and each of them is responsible for some particular job, but all together they work as one. The layers communicate with each other and in case of error they will retry and fix the error or if they are unable to do it, the responsible layer will inform the user about the source of the problem.
  • What happens when page is requested and received? If we will remove the graphical and visual image and look at the process that computer does. We will see a set of commands, mathematical algorithms, symbols, letters and not understandable codes and processes.
  • When data is sent from "A" to "B", a transport layer is responsible to send and deliver it correctly and exactly the same, what was requested.
  • If the request, processed by "A" (sender) is too long, the transport layer will divide it in segments (called segmentation process) to understand well and not make a mistake while sending the data to "B" (recipient). After this process data is travelling through the network to the "B" (recipient), if the sent data is segmented or divided, the transport layer is responsible for reassemble it again and "B" (recipient) receives its requested data (It can be web page or other data).
  • If the transport layer will not do the segmentation process, then the next - network layer - will check the data and if the requested message is too long it will fragment it (called fragmentation process) and will provide the same as transport layer had to do.
  • All the layers processes are connected to each other and work cooperatively.
5 0
3 years ago
Different the policies and protocols in the industry
Rashid [163]

Answer:

7ALWAYS KEEP FOCUS on brainly and I am have been a

8 0
2 years ago
The process of making raw materials into a finished product is known as
Olin [163]
1.) Business Engineering or Manufacturing :)
<span />
6 0
3 years ago
Read 2 more answers
What did the strict study generally find about the effect of internet use on sleep?
rjkz [21]
A. should be the answer hope this helps :)
4 0
3 years ago
Read 2 more answers
____ 59. Suppose that x and y are int variables, ch is a char variable, and the input is: 4 2 A 12 Choose the values of x, y, an
Vlada [557]

Answer:

d. This statement results in input failure.

Explanation:

We are taking input of 3 variables only and those are x,ch,and y. cin is a C++ keyword used take input entered by the user onto the screen cin is not a variable.

The input should of type int char int as written in the code. First is x and character variable ch and then the integer variable y and there should be only three inputs.

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is a benefit of peer-to-peer networking?
    14·2 answers
  • To calculate the chapter from which you must solve the programming exercise, divide the integer number representing your student
    10·1 answer
  • What is the "host" in a typical email address?
    14·1 answer
  • The purpose of the ________ element is to describe the contents of a table.
    15·1 answer
  • What was the first fully computer animated feature film?
    13·1 answer
  • The following relation schema can be used to register information on the repayments on micro loans.
    13·1 answer
  • You're setting up some VMs to test an application you're considering making available to employees of the small company you work
    11·1 answer
  • Besides your computer, where else can you find and use an operating system?
    11·1 answer
  • A laptop can be kept on palm to work. [true/false) ​
    5·1 answer
  • Write code that outputs variable numCats. End with a newline.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!