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
Which of the following describes fibers? a)- Single crystals with extremely large length-to-diameter ratios. b)- Polycrystalline
ElenaW [278]

Answer:

b)Poly crystalline and amorphous materials with small diameter

Explanation:

Fibers have high length to diameter ratio and also have high strength.Generally length of fibers is very high and diameter is very low as compare to length.

Mostly fibers is used to transfer data from one place to another place with help of  fiber optical cables.Fiber optic cables is used in telecommunication.In these cables data covert in to the electric single and reach at define location and after data is decode and covert from electric single in to original data.

Fibers poly crystalline and amorphous materials with small diameter.

6 0
4 years ago
python Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E.
MissTica

Explanation:

First of all get the input from the user, number of rows and number of columns where rows represents seat digit number and column represents the seat letter

rows is initialized to 1 to ensure that row starts at 1 or you can remove it then seat number will start from 0.

The first loop is used for digits starting from 1 to number of rows

The second loop is used for letters starting from 1 to number of columns

since rows and cols are not of the same type that's why we are converting the int type to string type

print(str(rows)+cols) counter will keep updating the columns A, B, C.....

rows= rows + 1 counter will keep updating the rows 1, 2, 3....

Code:

Please refer to the attached image.

Output:

Please enter the number of rows: 2

Please enter the number of columns: 3

1A

1B

1C

2A

2B

2C

3 0
3 years ago
You don't know which insert you have, and the inserts are different sizes, meaning the amount needed for a 1:3 ratio is differen
VashaNatasha [74]

Answer:

Explanation:

For ligation process the 1:3 vector to insert ratio is the good to utilize . By considering that we can take 1 ratio of vector and 3 ratio of insert ( consider different insert size ) and take 10 different vials of ligation ( each calculated using different insert size from low to high ) and plot a graph for transformation efficiency and using optimum transformation efficiency we can find out the insert size.

6 0
3 years ago
A 36 ft simply supported beam is loaded with concentrated loads 16 ft inwards from each support. On the left side, the dead load
lana66690 [7]

Answer:

1st part: Section W18X76  is adequate

2nd part: Section W21X62 is adequate

Explanation:

See the attached file for the calculation

8 0
3 years ago
15 POINTS! Help.
IRISSAK [1]

Answer: it would  overload

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • In a tensile test on a steel specimen, true strain is 0.171 at a stress of 263.8 MPa. When true stress is 346.2 MPa, true strain
    7·1 answer
  • he Weather Channel reports that it is a hot, muggy day with an air temperature of 90????F, a 10 mph breeze out of the southwest,
    6·1 answer
  • What are the four basic parts of process plan
    11·1 answer
  • Part of the following pseudocode is incompatible with the Java, Python, C, and C++ language Identify the problem. How would you
    12·1 answer
  • All welding processes that take place without melting of the work pieces. a)- True b)-False
    15·1 answer
  • A long rod of 60-mm diameter and thermophysical properties rho=8000 kg/m^3, c=500J/kgK, and k=50 W/mK is initally at a uniform t
    8·1 answer
  • ما جمع كلمة القوة؟help please
    10·1 answer
  • PLZZZZZ HELP
    7·2 answers
  • An ideal gas is contained in a closed assembly with an initial pressure and temperature of
    14·1 answer
  • Which of the following is critical when performing maintenance?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!