Answer to Question #297079 in Python for joo

Question #297079
  1. *5.39 (Financial application: find the sales amount) You have just started a sales job in a department store. Your pay consists of a base salary plus a commission. The base salary is $5,000. The following scheme shows how to determine the commission rate:

   

https://revel-ise.pearson.com/courses/6123e8c3e405345b4db8cc88/pages/a01d5f11c73c1edccab32f3f774833239daa8769e Page 11 of 15

Programming Exercises from the Book: Chapter 5 8/23/21, 3:12 PM

Note that this is a graduated rate. The rate for the first $5,000 is at 8%, the next $5,000 is at 10%, and the rest is at 12%. If the sales amount is 25,000, the commission is 5,000 * 8% + 5,000 * 10% + 15,000 * 12% = 2,700. Your goal is to earn $30,000 a year. Write a program that finds the minimum sales you have to generate in order to make $30,000.


1
Expert's answer
2022-02-13T09:44:49-0500


def getSales(money):
    if (money <= 5000):
        return money * 0.08
    elif (money <= 10000):
        return 5000 * 0.08 + (money-5000) * 0.1
    elif (money > 10000):
        return 5000 * 0.08 + 5000 * 0.1 + (money - 10000) * 0.12
    else:
        return 'Number must be positive'

print('required minimum sales: ', getSales(30000))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS