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
QveST [7]
3 years ago
9

Selling a new vehicle pays a salesperson $1500. Selling a used vehicle pays a commission of 5% of the selling price. Write an in

teractive program that calculates a salesperson's total pay for selling two vehicles, each one of any type. The program should prompt the salesperson to enter the type and selling price of each vehicle. Do not use a loop. The program should then display the salesperson's total sales and total pay. Express these amounts in currency format as described in the requirements above.
Engineering
1 answer:
Dahasolnce [82]3 years ago
4 0

Answer:

#Selling vehicles

import locale

locale.setlocale( locale.LC_ALL, 'en_CA.UTF-8' )

#Declaration of variables

total_pay=0

total_sales=0

#Selling details

for i in range(0,2):

   #Ask the type of sell

   type=input("Enter the type of the car you sold(used/new)? ")

   #Check error

   while(type.upper()!="USED" and type.upper()!="NEW"):

       print('ERROR!!!Should be used or new!!Please Re-enter')

       type=input("Enter the type of the car you sold(used/new)? ")

   #Input price of the car

   price=float(input("Enter the price of the car: "))

   #Calculations

   if(type.upper()=="NEW"):

       total_pay+=1500

   else:

       total_pay+=price*.05

   total_sales+=price

#Display results

print('Total Pay of the sale person = ',locale.currency(total_pay))

print('Total Sales = ',locale.currency(total_sales))

You might be interested in
A closed, 0.4-m-diameter cylindrical tank is completely filled with oil (SG 0.9)and rotates about its vertical longitudinal axis
egoroff_w [7]

Answer: p_{B} - p_{A} = 28800 Pa or 28.8 kPa

Explanation: To determine the pressure of a liquid in a rotating tank,it is used:

p = \frac{p_{fluid}.w^{2}.r^{2} }{2} - γfluid . z + c

where:

p_{fluid} is the liquid's density

w is the angular velocity

r is the radius

γfluid.z is the pressure variation due to centrifugal force.

For this question, the difference between a point on the circumference and a point on the axis will be:

p_{B} - p_{A} = \frac{p_{fluid}.w^{2}.r_{B} ^{2} }{2} - γfluid.z_{B} - (\frac{p_{fluid}.w^{2}.r_{A} ^{2} }{2} - γfluid.z_{A})

p_{B} - p_{A} = \frac{p_{fluid}.w^{2}}{2} (r_B^{2} - r_A^{2} ) - γfluid(z_{B} -z_{A})

Since there is no variation in the z-axis, z = 0 and that the density of oil is 0.9.10³kg/m³:

p_{B} - p_{A} = \frac{p_{fluid}.w^{2}}{2} (r_B^{2} - r_A^{2} )

p_{B} - p_{A} = \frac{0.9.10^3.40^2}{2}(0.2^2 - 0)

p_{B} - p_{A} = 28800

The difference in pressure between two points, one on the circumference and the other on the axis is p_{B} - p_{A} = 28800 Pa or 28.8 kPa

8 0
3 years ago
What is a heat engine? State its efficiency (a sketch would be appropriate).
dimulka [17.4K]

Answer:

\eta =\dfrac{Q_1-Q_2}{Q_1}

Explanation:

Heat engine

 Heat engine is a device which produce work while consuming some amount of energy .This engine works in cycle.In other words we can say that Heat engine is a device which covert thermal or chemical energy in to mechanical energy and after that this mechanical energy can be use for producing mechanical work.

Heat engine takes heat from high temperature and rejects heat to lower temperature and producing work.

We know that efficiency given as

\eta =\dfrac{out\ put}{in\ put}

From diagram we can say that

Q_1=Q_2+W

So efficiency

\eta =\dfrac{w}{Q_1}

\eta =\dfrac{Q_1-Q_2}{Q_1}

3 0
3 years ago
The lattice constant of a body centered cubic unit cell is a=4.85 oA. Determine the volume density of atoms. (Hints: Volume dens
Lelechka [254]

Answer:

the volume density of atoms = 1.75 x 10^22 /cm3

Explanation:

The detailed steps is as shown in the attached file.

3 0
3 years ago
A steel rod, which is free to move, has a length of 200 mm and a diameter of 20 mm at a temperature of 15oC. If the rod is heate
kherson [118]

Explanation:

thermal expansion ∝L = (δL/δT)÷L ----(1)

δL = L∝L + δT ----(2)

we have δL = 12.5x10⁻⁶

length l = 200mm

δT = 115°c - 15°c = 100°c

putting these values into equation 1, we have

δL = 200*12.5X10⁻⁶x100

= 0.25 MM

L₂ = L + δ L

= 200 + 0.25

L₂ = 200.25mm

12.5X10⁻⁶ *115-15 * 20

= 0.025

20 +0.025

D₂ = 20.025

as this rod undergoes free expansion at 115°c, the stress on this rod would be = 0

3 0
3 years ago
List three technologies that pose ethical dilemmas?
Setler [38]
Hacking into medical devices
3-D printing
Driverless Zipcars
6 0
3 years ago
Other questions:
  • A car crusher has one hydraulic input piston with diameter 2 ft and 6 crushing pistons with diameter 10 feet. If this car needs
    15·1 answer
  • Convert 850 nm wavelength into frequency, eV, wavenumber, joules and ergs.
    8·1 answer
  • Determine ten different beam loading values that will be used in lab to end load a cantilever beam using weights. Load values sh
    7·1 answer
  • Which option is a potential environmental benefit of adopting a new<br> technology?
    9·2 answers
  • While discussing PCM monitor tests: Technician A says that some monitors only run after another monitor completes. Technician B
    10·1 answer
  • Which of the following terms is defined as small bumps and slashes within a fluid power system?
    15·2 answers
  • Estimate the maximum expected thermal conductivity for a Cermet that contains 58 vol% titanium carbide (TiC) particles in a coba
    8·1 answer
  • 8. What is the purpose of the 300 Log?
    12·1 answer
  • Hia how yall doin, someone somehow revived me thro a screen--
    11·2 answers
  • Help with this pls!!!
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!