Write a program with a method computeCommission which takes a double that is the salesAmount and returns the commissions for sales from $10,000 to $100,000 in increments of $5,000. Commissions are calculated by one of two formulas depending on the amount:a. A sale up to $50,000, 8 percent for the first $5,000 and 10 percent of the remainderb. A sale over $50,000, 9 percent for the first $5,000 and 12 percent of the remainderE

Respuesta :

Answer:

Explanation:

def computeCommission(salesAmount):

   commission=0

   if salesAmount <= 50000:

       commission = 5000*0.08 + (salesAmount-5000)*0.1

   elif salesAmount > 50000:

       commission = 5000*0.09 + (salesAmount-5000)*0.12

   return commission

print("commission for 45000 : "+str(computeCommission(45000)))

print("commission for 54000 : "+str(computeCommission(54000)))

Ver imagen dayanandghelaro