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

Answers

Answer 1

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))


Related Questions

Review the following definition of sustainable construction projects:
Sustainable construction projects demonstrate common sense applications of natural resources throughout the life of the project.
Sustainable projects also take into account the long-term effects on the environment, including how energy and materials are used and
recycled, which should be incorporated into the building itself.
Based on this definition, which of the following characteristics is not a characteristic of sustainable construction projects?

Energy and material efficiency in construction, operation, and maintenance.

Established technologies that have been in use for several decades

Low environmental impacts over the project's life cycle.

High ratio of renewable energy to fossil energy in construction, operation and maintenance,

Answers

Answer:

Established technologies that have been in use for several decades

Explanation:

Answer:I’m not sure

Explanation:

This is your data.
A= [5, 10, 15]
B = [2, 4, 6]
C = ['dog','cat', 'bird']
You can implement an array of this data with

Answers

Answer:

This is your data.

A =  [5, 10, 15]

B =  [2, 4, 6]

C =  ['dog','cat', 'bird']

You can implement an array of this data with  

either by using lists or by using the array module

ALSO

This is your code.

>>> A = [ 'dog', 'red']

>>> B = [ 'cat', 'blue']

>>> C = [ 'fish', 'green']

You can implement an array of this data by using  

by using lists but not by using the array module

Explanation:

Edge2020

A= [5, 10, 15],  B = [2, 4, 6], C = ['dog','cat', 'bird']. You can implement an array of this data either by using lists or by using the array module.

What is an Array?

An array is a type of data structure used in computer science that holds a set of elements that are all uniquely recognized by at least one array index or key. Each element of an array is recorded such that a mathematical formula may be used to determine its location from its index tuple.

Indexed arrays, multidimensional arrays, and associative arrays are the three types of arrays.

A procedure called indexing selects a subset of values from an array. A value's position inside an array is indicated by its index. The location of the value in an array differs from the value itself.

To read more about Array, refer to - https://brainly.com/question/14375939

#SPJ2

So my teacher asked us to predict who would win in a death match, and we could choose the two characters, so Alastor from Hazbin Hotel vs Blackhat from villinous, who would win?

Answers

Answer:

I think alastor from Hazbin Hotel.

Answer:

alastor

Explanation:

i mean alastor is a demon and blackhat we dont know if he is a demon or not but i mean alastor would win he took down a flying ship that was trying to kill them

Give two examples of search​

Answers

Answer:

goo.gle and ya.hoo

Explanation:

Web browser, book looking up

What might the Internet of Things do in the future?

Answers

The future of IoT has the potential to be limitless. Advances to the industrial internet will be accelerated through increased network agility, integrated artificial intelligence (AI) and the capacity to deploy, automate, orchestrate and secure diverse use cases at hyperscale.

Do you need a internet browser to go to the intrnet?​

Answers

Answer:

No you do not need a interent browzer to get to the internet.

Explanation:

Not sure but I don’t think so
Other Questions
I need help and for the other select its are or are not What is greater? 50 ppm (parts per mile) or 1.1 meters? Write a system of equations to describe the situation below, solve using substitution, and fill in the blanks. Craig's Bakery recently spent a total of $311 on new equipment, and their average hourly operating costs are $9. Their average hourly receipts are $10. The bakery will soon make back the amount it invested in equipment. How many hours will that take? What would the total expenses and receipts both equal? Line A is parallel to line B, if the measure of A wave in which particles of matter vibrate at right angles to the directionthe wave travels is called a(n) wave.Enter the answerCheck It 1. Most of this excerpt is written in the present tense. The effect of thisstylistic choice is to make the situation seem more*O mysteriousO remoteO immediateOlistless HELLLPPPPPPPPPPPPPPPPPP Help help help! Its due in a few mins! What can you determine about an element if you only know its group number on the periodic table?A. The total number of protons and neutronsB. The number of protonsC. The total number of electronsD. The number of valance elctrons The Fill in the Blank is a small access port in the shell of a bean that allows water to reach the developing plant. Please help me I will give you the brain thing with extra points if you help me, please. I need to get this right. 10/10 In 1836, an attack by Mexican forces on the Alamo mission Select one: a. saw the American garrison executed after it had surrendered. b. saw the death of Davy Crockett. c. began the Mexican War. d. led Americans in Texas to proclaim their independence from Mexico. e. was a surprising victory for American forces in Texas. Schizophrenia is a mental disorder in which a person loses contact withreality. *TrueFalse Answer these questions about killer whales:What do killer whales look like? Be very specific, colors, size, length, spots, stripes, camouflage...etc.What are some facts about killer whales? List at least 5.I will give brainliest, thanks, friend request, and 5 stars to the best answer. HELP!!!!The half note is the home-base that we measure all the other notes against.TrueFalse please help will give brainliest What is 2 times 2? It would be really helpful. I really need help on this one, I don't understand. Please help if you can Saul makes green paint by mixing blue paint and yellow paint.For every 4 gallons of green paint, he uses 3 gallons of blue paint.Drag the correct number of each type of paint into the box that would make 16 gallons of paint the same shade of green as Saul's. JEJEISHEVEHSUEHRH PLEASE PLEASE HELP me!!! can give brainliest!Joyce would like to invest her money in a savings account. The function A (t) = 900(1.03)^t represents the amount of money joyce will have in her savings account after t years. How long will it take Joyce to have $1200 in her account? Around your answer to the nearest tenth of a year. ( use desmos )