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 Web site that allows users to enter text, such as a comment or a name, and then stores it and later display it to other users,
balandron [24]

Answer:

Option(c) is the correct answer.

Explanation:

Cross-site scripting is the type of security breach that are usually found in the  software applications.The main objective of cross site scripting it is used by the hackers to exploit the data security.

  • The cross site scripting is the collection of web pages  that enables people to insert the text like comment,  name stores it afterwards it save the data and then  it appears to the other users.
  • Others options are incorrect because they are not related to given scenario.
5 0
2 years ago
Read 2 more answers
How do you find the exterior angle measure of any regular polygon? (The degree in which to turn the turtle to draw a shape)
Diano4ka-milaya [45]

Answer:

360/number of sides

Explanation:

all the exterior angles add up to 360°

so to find each angle mesure, divide the 360 by the number of sides the figure has.

7 0
3 years ago
Im Gonna Give Brainly a Second Chance<br><br> Everybody deserves a second chance
Nady [450]

Answer:

ok I know it's not for me but for who?

Explanation:

Just asking. And yes everyone deserves a second chance. Even liars?

please don't take my question wrongly have an above average day!

7 0
3 years ago
Read 2 more answers
What are the common characteristics of a bastion host?
Ksju [112]
The bastion host node is typically an influential server with better-quality security actions and custom software. It frequently hosts only a single request because it wants to be very good at whatever it does. The software is commonly modified, limited and not obtainable to the public. This host is envisioned to be the strong fact in the network to care for the system last it. Therefore, it often endures unvarying maintenance and audit. Occasionally bastion hosts are used to draw occurrences so that the basis of the attacks may be outlined. The bastion host practices and filters all inward traffic and averts malicious traffic from incoming the network, acting much like a gateway. 
6 0
2 years ago
What button is used for paragraph alignment on Microsoft 2016?
Margarita [4]
Just click the buttons on the Paragraph tab on Home.
6 0
3 years ago
Other questions:
  • What is the first step in the exchange between a web browser and a database?
    7·1 answer
  • Select the best answer for the question. 2. What is the simplest way to permanently get rid of an unwanted file?
    13·1 answer
  • JavaScript uses which property to change the current content of HTML elements?
    6·1 answer
  • True/False
    13·1 answer
  • Which of the following modes of replication requires a very low latency network connection and ensures data remains in synch wit
    9·1 answer
  • An online journal or diary you create to share your thoughts, opinions and personal news is referred to
    13·1 answer
  • JAVA
    5·1 answer
  • A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed
    15·1 answer
  • How does computer number system play a Vital role in a computer calculation. ​
    8·1 answer
  • What feature is available to add a auggestion in the margin of someone else's document.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!