answer.
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
In a transaction-processing system (tps), if the tps database can be queried and updated while the transaction is taking place,
Alona [7]
This is called Real time processing. A Transaction Processing System (TPS) is a kind of data framework that gathers, stores, adjusts and recovers the information exchanges of an undertaking. Exchange handling frameworks additionally endeavor to give unsurprising reaction times to demands, despite the fact that this is not as basic with respect to continuous frameworks.
6 0
2 years ago
A dietician wants you to write a program that will calculate the number of calories a person can lose by walking at a slow pace
gregori [183]

Answer:

The pseudocode is as follows

1. Input Steps

2. Input Day

3. Miles = Steps/2000

4. Calories = 65 * Miles

5. Print Calories

6. Stop

Explanation:

This line gets the number of steps for the day

1. Input Steps

This line gets the current day

2. Input Day

The line calculates number of miles

3. Miles = Steps/2000

This line calculates the calories lost

4. Calories = 65 * Miles

This line prints the calories lost

5. Print Calories

The pseudocode ends here

6. Stop

6 0
2 years ago
What is wrong with line 1?
Gelneren [198K]

Answer:

The set is a object of the class 'H' and the setY method is a member of G class which is not called by the object of H class.

Explanation:

  • If a user calls the G function which is not a private by the help of H class objects then it can be called. It is because all the public and protected methods of A class can be accessed by the B class if B extends the A-class.
  • If any class is extended by the other class then the derived class holds the property of the base class and the public and protected method can be accessed by the help of a derived class object.
  • The derived class object can be created by the help of base class like written in the "line 1".
  • But the base class can not call the member of the derived class.
5 0
2 years ago
A computer application such as Microsoft Access that is used to store data and convert it into information is a ________________
lorasvet [3.4K]
All data is stored in table
5 0
2 years ago
While in an interactive nslookup session, you'd use the ______ keyword to change the DNS server you're using
serious [3.7K]
Hostname is assigned to a device that would be connected to the computer network and thus would help in identifying the form of electronic communication. While in an interactive nslookup session, one would use the DMNNAMSVR keyword to change the DNS server one is using.
4 0
2 years ago
Read 2 more answers
Other questions:
  • 5. You just bought a new hard drive for youYou plan to use this as a secondary hard drive to store allcomputeryour UMA files. On
    8·1 answer
  • A storyboard is essentially an outline of a web page's content and design<br> -True or False
    8·2 answers
  • When a machine on the public network wants to reach the server at 172.30.0.10, which ip will it use?
    6·2 answers
  • Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh
    13·1 answer
  • Which of the following is a true statement about cloud computing?
    6·1 answer
  • Write a program that reads the lengths of the sides of a triangle from the user. Compute the area of the triangle using Heron's
    8·1 answer
  • Which of the following image file formats uses lossy file compression?
    7·1 answer
  • You learn that in a previous security breach at GearUp, a disgruntled employee destroyed the encryption key that had been used t
    7·1 answer
  • An intruder with malicious intent breaks into an office and steals a hard drive containing sensitive information about the compa
    12·1 answer
  • Spark is electrical discharge in air, while air is mix of variety of gases what particles conduct electricity in gas
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!