# Write a python program and solve the problem.Selling a new vehicle pays a salesperson \$1800. Selling a used vehicle pays a commission of 10% of the selling price. Write an interactive program that calculates a salesperson's total pay for selling two vehicles, one of each 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.

Question
148 views

Write a python program and solve the problem.

Selling a new vehicle pays a salesperson \$1800. Selling a used vehicle pays a commission of 10% of the selling price. Write an interactive program that calculates a salesperson's total pay for selling two vehicles, one of each 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.

check_circle

Step 1

Program Instructions:

• Prompt the user to enter type and selling price of 2 vehicles. One must be old and the other one must be new.
• Calculate the total pay based on 10% commission and total pay with mentioned selling price.
• Print the total pay and total sales.
Step 2

Program:

# variable declarations

total_pay = 0.0

total_sale = 0.0

# prompt for user

type1 = input("Enter the type of car sold (N/U): ")

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

type2 = input("Enter the type of car sold (N/U): ")

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

# calculating total pay

if(type1.upper()=='U'):

to...

### Want to see the full answer?

See Solution

#### Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in