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]
1 year 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]1 year 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 this exercise we look at memory locality properties of matrix computation. Th e following code is written in C, where element
Sonja [21]

Answer:

Explanation:

temporal locality can be defined as: when a particular memory  is referenced or accessed several times  within a specific period of time. In the question, i think the variable that exhibit temporal locality are I, J and 0(all the variable). This is because the variable J and 0 are accessed several times within the loop. I would not have been part of it, but in the A[I][J]=B[I][0]+A[J][I], the variable "I" is also accessed in the addition. this is why it is part of the temporal locality.

4 0
2 years ago
A technician is trying to use the tablet to control the iot device digital lamp. the technician tries to login to the registrati
Rom4ik [11]
<span>In the scenario in which a technician is trying to use the tablet to control the IoT device digital lamp, but </span><span>the access is not successful the two problems are:
</span>The registration service on the server is off.
The digital lamp is using the wrong credential to connect to the registration server.
3 0
2 years ago
Maurice has just purchased his first computer, which contains a preinstalled suite of basic software applications. He receives a
Oksanka [162]
This file will most likely _____.

A. convert itself into a different file type that his computer will recognize with one of its preinstalled software applications
5 0
2 years ago
Read 2 more answers
Create a program to deteate a program to determine whether a user-specified altitude [meters] is in the troposphere, lower strat
allsm [11]

Answer:

#include <iostream>

using namespace std;

int main()

{

   float altitude;

   cout<<"Enter alttitude in meter";

cin >>altitude;

if(altitude<0 || altitude > 50000)

{

   cout<<"Invalid value entered";

   return 0;

}

else{

   if(altitude<= 10000)

   {cout <<"In troposphere "<<endl;}

   

   else if(altitude>10000 && altitude<=30000)

   {cout <<"In lower stratosphere"<<endl;}

   

   else if(altitude>30000 && altitude<=50000)

   {cout <<"In upper stratosphere"<<endl;}

   

}

   return 0;

}

Explanation:

Define a float type variable. Ask user to enter altitude in meters. Store value to altitude variable.

Now check if value entered is positive and less than 5000,if its not in the range of 0-50,000 display a termination message and exit else check if it's in less than 10000, in between 10000 and 30000 or in between 30000 and 50000.

10,000 is above sea level is troposphere.

10,000-30,000 is lower stratosphere.

30,000-50,000 is upper stratosphere.

8 0
2 years ago
The database structure in a dbms is stored as a _____.
Colt1911 [192]
This will be stored as a collection of files
6 0
2 years ago
Other questions:
  • Which statement regarding dialogues in multiplayer games is true? Dialogues are based only on players’ actions.
    7·2 answers
  • Brittany just pulled up a database table with employee information that contains 50 records of employees at her company. Which o
    12·1 answer
  • Survey Q, Non-scoring: What role are you playing in your team?
    5·2 answers
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the ga
    12·2 answers
  • In the game of $Mindmaster$, secret codes are created by placing pegs of any of seven different colors into four slots. Colors m
    5·1 answer
  • A user called to inform you that the laptop she purchased yesterday is malfunctioning and will not connect to her wireless netwo
    15·1 answer
  • A security administrator is implementing a SIEM and needs to ensure events can be compared against each other based on when the
    11·1 answer
  • Which decimal value (base 10) is equal to the binary number 1012?
    5·1 answer
  • Write a method called printRangeOfNumbers that accepts a minimum, maximum numbers as parameters and prints each number from mini
    6·1 answer
  • Accenture has put together a coalition of several ecosystem partners to implement the principles of blockchain and Multi-party S
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!