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))