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]
2 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]2 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
​Write 83,120 in expanded form using powers of 10.
maksim [4K]

Answer:

8*10000+3*1000+1*00+2*10+2

Explanation:

8 0
2 years ago
A 4-L pressure cooker has an operating pressure of 175 kPa. Initially, one-half of the volume is filled with liquid and the othe
vodomira [7]

Answer:

the highest rate of heat transfer allowed is 0.9306 kW

Explanation:

Given the data in the question;

Volume = 4L = 0.004 m³

V_f = V_g = 0.002 m³

Using Table ( saturated water - pressure table);

at pressure p = 175 kPa;

v_f = 0.001057 m³/kg

v_g = 1.0037 m³/kg

u_f = 486.82 kJ/kg

u_g 2524.5 kJ/kg

h_g = 2700.2 kJ/kg

So the initial mass of the water;

m₁ = V_f/v_f + V_g/v_g

we substitute

m₁ = 0.002/0.001057  + 0.002/1.0037

m₁ = 1.89414 kg

Now, the final mass will be;

m₂ = V/v_g

m₂ = 0.004 / 1.0037

m₂ = 0.003985 kg

Now, mass leaving the pressure cooker is;

m_{out = m₁ - m₂

m_{out = 1.89414  - 0.003985

m_{out = 1.890155 kg

so, Initial internal energy will be;

U₁ = m_fu_f + m_gu_g

U₁ = (V_f/v_f)u_f  + (V_g/v_g)u_g

we substitute

U₁ = (0.002/0.001057)(486.82)  + (0.002/1.0037)(2524.5)

U₁ = 921.135288 + 5.030387

U₁ = 926.165675 kJ

Now, using Energy balance;

E_{in -  E_{out = ΔE_{sys

QΔt - m_{outh_{out = m₂u₂ - U₁

QΔt - m_{outh_g = m₂u_g - U₁

given that time = 75 min = 75 × 60s = 4500 sec

so we substitute

Q(4500) - ( 1.890155 × 2700.2 ) = ( 0.003985 × 2524.5 ) - 926.165675

Q(4500) - 5103.7965 = 10.06013 - 926.165675

Q(4500) = 10.06013 - 926.165675 + 5103.7965

Q(4500) = 4187.690955

Q = 4187.690955 / 4500

Q = 0.9306 kW

Therefore, the highest rate of heat transfer allowed is 0.9306 kW

5 0
3 years ago
Cho P1= XdaN, P2=3.X daN, P= 2.X (daN). a=1m, b=2m,MCN hình tròn d= (100+X)mm1/ Tính nội lực tại các mặt cắt cách ngàm 0,5m; 1m;
DaniilM [7]

Answer:

Please explain it in English so that i can help or you need someone else who can speak Vietnam

5 0
2 years ago
O que é necessário se conhecer para a determinação de uma força concentrada em um ponto?
skelet666 [1.2K]

Answer: its c

Explanation:

7 0
3 years ago
Question 1 of 8.
Rasek [7]
The answer seems pretty obvious, all of the above
8 0
3 years ago
Read 2 more answers
Other questions:
  • A cylindrical drill with radius 4 is used to bore a hole through the center of a sphere of radius 5. Find the volume of the ring
    15·1 answer
  • Consider a plane composite wall that is composed of two materials of thermal conductivities kA = 0.1 W/m*K and kB = 0.04 W/m*K a
    13·1 answer
  • What is the difference Plastic vs elastic deformation.
    13·1 answer
  • Which definition best fits the idea of electrical resistance in a wire? A. the decrease in current flow due to electrons collidi
    12·1 answer
  • Describe with an example how corroded structures can lead to environment pollution? ​
    13·1 answer
  • What word is typically written at the bottom of a cover letter to indicate an
    12·2 answers
  • You talk with the owner and he likes the idea of using two large glulam beams as shown to carry the joist loads. Design the glul
    5·1 answer
  • A front wheel drive vehicle with four wheel disc brakes is pulling to the left. Tech A says an external kink or internal restric
    13·1 answer
  • A fill covering a wide area is to be placed at the surface of this profile. The fill has a total unit weight of 20 kN/m^3 and is
    11·1 answer
  • Is my paper's main idea, or thesis, clearly stated early on (within the first paragraph, ideally)?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!