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
Nataly_w [17]
2 years ago
15

A shop will give discount of 10% if the cost of purchased quantity is more than 1000. Ask user for quantity suppose, one unit wi

ll cost 100. Judge and print total cost for user.
Computers and Technology
1 answer:
UkoKoshka [18]2 years ago
4 0

Answer:

The program in Python is as follows:

qty = int(input("Quantity: "))

price = 100 * qty

if qty >1000:

    price = (100 - 0.10 * 100) * qty

print("Cost: "+str(price))

Explanation:

This prompts the user for the quantity

qty = int(input("Quantity: "))

This calculates the price or cost, without discount

price = 100 * qty

This checks if the quantity is greater than 1000

if qty >1000:

If yes, this calculates the price or cost, after discount

    price = (100 - 0.10 * 100) * qty

This prints the calculated cost

print("Cost: "+str(price))

You might be interested in
What is the best stratiget to avoid paying intrest in your credit cared
pochemuha
Paying it in full month over month.
4 0
3 years ago
The document responsible for describing the type of data stored in the database is called the:
vredina [299]

it's called the data dictionary

6 0
3 years ago
This is going to get taken down but I dont care add me on discord cause ima bored<br> -Red-#9847
Alex777 [14]

Answer:

I WILL

Explanation:

6 0
2 years ago
True or false? any webb app can be accessed and run on any computing
Mademuasel [1]

Answer:

B. False

Explanation:

A web application is a computer program that  works over the internet. So, in order to access and run it you need a web browser and this will also require to have an internet access. If you don't have one of these you will not be able to run the app.

6 0
2 years ago
What is x squared times b squared
Pie

Answer:

x^2 * b^2

Explanation:

Like 3 squared times 2 squared is 3*3*2*2. Similarly the expression given in the question is equal to x*x*b*b. And that explains what is mentioned in question.

3 0
3 years ago
Other questions:
  • Judy forgot where she saved a certain file on her computer. Therefore, she searches for all files with a .jpg file extension. Wh
    10·2 answers
  • Which of these is an expansion slot type?
    5·1 answer
  • 9
    10·1 answer
  • PLEASE HURRY 30 POINTS
    15·2 answers
  • Which element is represented by the electron configuration in example B? Example B: 1s22s22p63s23p64s1 Aluminum Cesium Potassium
    12·2 answers
  • Where is 5G being used and how fast is it?​
    5·2 answers
  • What is the correct way to write h1 tag
    12·1 answer
  • Laptop computers use PCMCIA cards, another type of ________
    15·1 answer
  • List 10 examples of computer ethics<br>(please give even 1 if you can, I need it urgently) ​
    10·1 answer
  • identify the difficulties with the k-nearest neighbor algorithm. a. both a and b b. calculate the distance of the test case from
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!