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
T
solniwko [45]

Answer:

Common Uses: Boxwood is well-suited for carving and turning, and the tree's diminutive size restricts it to smaller projects. Some common uses for Boxwood include: carvings, chess pieces, musical instruments (flutes, recorders, woodwinds, etc.), rulers, handles, turned objects, and other small specialty items.If you want a small, compact, low-growing shrub to form a hedge that serves as an accent or border along your walkway, fence line or planting beds, dwarf boxwood varieties are the best pick. The "Dwarf English" boxwood (Buxus sempervirens “Suffruticosa”) creates a border hedge approximately 1 to 2 feet in height.

Explanation:

3 0
3 years ago
Implement the following Matlab code:
vagabundo [1.1K]
28384 *x soít cos estematema
3 0
3 years ago
Compute L, T, M, LC, and R and stations of the BC and EC for the circular curve with the given data of: I (delta) = 22°15′00" an
Mars2501 [29]

Answer:

L = 475.718

T = 240.89 ft

M = 23.0195

LC = 472.728

R = 1225 ft

Explanation:

See the attached file for the calculation.

8 0
2 years ago
A tank with some water in it begins to drain. The function v ( t ) = 46 − 3.5 t determines the volume of the water in the tank (
olchik [2.2K]

Answer with Explanation:

Part a)

The volume of water in the tank as a function of time is plotted in the below attached figure.

The vertical intercept of the graph is 46.

Part b)

The vertical intercept represents the volume of water that is initially present in the tank before draining begins.

Part c)

To find the time required to completely drain the tank we calculate the volume of the water in the tank to zero.

0=46-3.5t\\\\3.5=46\\\\\therefore t=\frac{46}{3.5}=13.143minutes

Part d)

The horizontal intercept represents the time it takes to empty the tank which as calculated above is 13.143 minutes.

7 0
3 years ago
What happens when the arms of the milky move away from the center of the galaxy
Alina [70]
Well this question is though because we have never seen such a thing ! and to be quite frank when that happens , nothing good comes from it. Black Holes
6 0
3 years ago
Other questions:
  • an existing highway-railway at-grade crossing is being redesigned as grade separated to improve traffic operations. The railway
    8·1 answer
  • 2. In the above figure, what type of cylinder arrangement is shown in the figure above?
    9·2 answers
  • Which utility program reads an assembly language source file and produces an object file?
    6·1 answer
  • A typical aircraft fuselage structure would be capable of carrying torsion moment. a)True b)- False
    12·1 answer
  • Who does each person work for? Monica works for a power company, Travis works for a utilities company, and Maggie is self-employ
    15·2 answers
  • Construct a link mechanism of crank oa 30mm rotating clockwise rod ab 100mm and bc 50mm
    13·1 answer
  • If a population has no predadors and plenty of available resources, how might that population change
    15·1 answer
  • Which one of the following best defines hardness: (a) energy absorbed by a material when an object strikes its surface, (b) resi
    8·1 answer
  • which type of irrigation fluid is typically used for endoscopic procedures using monopolar electrosurgery
    15·1 answer
  • The three construction crafts that require a MINIMUM of a 4-year college degree are
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!