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]
3 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]3 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
What is a life cycle
pochemuha

the definition of a life cycle is  the series of changes in the life of an organism, including reproduction

let me know if I helped <em>@OfficalOliviaB.</em>

4 0
3 years ago
Read 2 more answers
PLEASE HELP!
kakasveta [241]
I would say C , Supercomputer
3 0
3 years ago
Read 2 more answers
The Internet of Things (IoT) is a concept with emphasis on machine-to-machine communications to describe a more complex system t
VLD [36.1K]

Answer:

IoE(Information of Everything)  is the correct answer to the following question.

Explanation:

The following answer is correct because it is the concept that process, data, people and also Internet of Things brings together by which the network connection become more valuable and more compatible as compared to before and also it can extend the IoT(Internet of Things).

So, that's why the following answer is correct.

8 0
3 years ago
The numbers on the bottom of a typical check represent all of the following EXCEPT
Phantasy [73]
<span>These numbers indicate the account a check is drawn on and from which bank.</span>
5 0
3 years ago
What are the three main components of a for loop?
insens350 [35]

Answer:

Similar to a While loop, a For loop consists of three parts: the keyword For that starts the loop, the condition being tested, and the EndFor keyword that terminates the loop.

Explanation:

Loop statements usually have four components: initialization (usually of a loop control variable), continuation test on whether to do another iteration, an update step, and a loop body.

8 0
3 years ago
Other questions:
  • A cell reference that has only one $ is referred to as a(n) ____ cell reference. alternative mixed relative absolute
    7·1 answer
  • COMPUTER SCIENCE:PIXELS
    5·1 answer
  • What should a password policy contain to reduce a hackers ability to crack the passwords?
    10·1 answer
  • A Raycast returns a float that tells you how far away an Object is
    8·1 answer
  • Which software application offers a variety of templates for creating reports, flyers, and newsletters that you can access withi
    12·1 answer
  • Give your own example of a nested conditional that can be modified to become a single conditional, and show the equivalent singl
    12·1 answer
  • A company has a website that has seen a large increase in visitors and they are concerned that if the trend continues, the web s
    13·1 answer
  • What is Celeste? ( This is for my coding class )
    6·2 answers
  • The technique helps you explore possible risks by providing access to risk areas identified in the past. It also provides the so
    10·1 answer
  • You are considering using Wi-Fi triangulation to track the location of wireless devices within your organization. However, you h
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!