Question

In: Computer Science

A company pays its salespeople on a commission basis. The salespeople are paid $200 per week...

A company pays its salespeople on a commission basis. The salespeople are paid $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000 worth of merchandise in a week is paid $200 plus 9% of $5000, for a weekly pay of $650.

Create an application that uses a for loop to input each sales person’s gross sales for the week, and calculates and displays that sales person’s weekly pay. Process one sales person’s figures at a time. In the end, print out the weekly total sales and total pay for all company salespeople. All output values should be labeled and formatted to include a dollar sign and two decimal digits (i.e., dollars and cents). Skip lines in the output to separate data for each person and to separate the totals from the individual data.

Here is a pseudocode definition of the program requirements:

Initialize variables used to accumulate company totals for sales and weekly pay

Prompt the user to enter the number of salespersons to be processed

For each salesperson

Prompt the user to enter the weekly sales for that person Calculate and display and display the weekly pay for that person

Update variables used to accumulate company totals for sales and weekly pay

Display company totals for sales and weekly pay

Here is a sample test run of the application: sales commission calculator

Enter the number of salespersons: 2

Enter sales in dollars for sales person 1: 5000

Weekly pay is $650.00

Enter sales in dollars for sales person 2: 7500

Weekly pay is $875.00

Total weekly sales: $12500.00

Total weekly pay: $1525.00

THIS IS IN PYTHON

Solutions

Expert Solution

n=int(input('Enter the number of salespersons: '))
totalSales=0
totalPay=0
for i in range(0,n):
sales=float(input('Enter sales in dollars for sales person '+str((i+1))+': '))
print('Weekly pay is ${0:.2f}'.format(200+(0.09*sales)))
totalSales=totalSales+sales
totalPay=totalPay+(200+(0.09*sales))
print('Total weekly sales: ${0:.2f}'.format(totalSales))
print('Total weekly pay: ${0:.2f}'.format(totalPay))


Related Solutions

A company pays its salespeople on a commission basis. The salespeople each receive $250 per week...
A company pays its salespeople on a commission basis. The salespeople each receive $250 per week plus 11 percent of their gross sales for the sales period. For example, a salesperson who grosses $5000 in sales in the period receives $250 plus 11 percent of $5000, or a total of $812.21. Write a program (using an array of counters) determines for each salesperson their total sales, their salary and additional data points. There are 12 salesmen for the company. The...
A company pays its five salespeople on a commission basis. The salespeople receive $200 plus 10%...
A company pays its five salespeople on a commission basis. The salespeople receive $200 plus 10% of their sale. For example, for the employee sale of $1000, the commission is $300. Write a C program that: inputs each employee sales. The program then calculates the employee commission, prints out each employee commission. The program calculates the total sum of all commissions paid, and print. Your program will use a sentinel value to exit. You must use a one-dimensional array for...
C++ Program A company pays its salespeople on a commission basis.  The salespeople each receive $250 per...
C++ Program A company pays its salespeople on a commission basis.  The salespeople each receive $250 per week plus 11 percent of their gross sales for the sales period.  For example, a salesperson who grosses $5000 in sales in the period receives $250 plus 11 percent of $5000, or a total of $812.21.  Write a program (using an array of counters) determines for each salesperson their total sales, their salary and additional data points.  There are 12 salesmen for the company.  The input data file...
First The sales department of a cellular phone company pays its salespeople $1,500 per month plus...
First The sales department of a cellular phone company pays its salespeople $1,500 per month plus 25 percent of each new subscriber’s first month’s billings. A new subscriber’s first-month bill averages $80. Salespeople work 160 hours a month (four weeks at 40 hours per week). If salespeople work more than 160 hours per month, they receive $12 per hour for hours in excess of 160. Sales leads for the sales department are generated in a variety of ways—direct mailings to...
Assume that a welfare program pays $200 per week if a person does not work and...
Assume that a welfare program pays $200 per week if a person does not work and reduces the welfare benefit of dollar for dollar with earnings. Assume that the individual does not have any other non wage income. Also assume that the individual has a market wage rate of $10/ hour. Assume a maximum of 120hours of leisure per week (T= 120/ week). What is the breakeven level of earnings under the program? What is the breakeven level of hours...
Assume that a welfare program pays $200 per week if a person does not work and...
Assume that a welfare program pays $200 per week if a person does not work and reduces the welfare benefit of dollar for dollar with earnings. Assume that the individual does not have any other non wage income. Also assume that the individual has a market wage rate of $10/ hour. Assume a maximum of 120hours of leisure per week (T= 120/ week). What is the breakeven level of earnings under the program? What is the breakeven level of hours...
A company recently switched its compensation plan. Prior to the switch, salespeople were paid a higher...
A company recently switched its compensation plan. Prior to the switch, salespeople were paid a higher salary, but their commission on each item sold was smaller. After the switch, the salary was less, but the commission for each item sold was larger. A complaint was lodged with HR with the threat of legal action claiming the sales team was making less money. The HR director examined the salaries of nine randomly selected salespeople. Their salaries ($1000’s) before and after the...
Glade, Inc. is trying to decide whether to increase the commission-based pay of its salespeople. Currently,...
Glade, Inc. is trying to decide whether to increase the commission-based pay of its salespeople. Currently, each of its five salespeople earns a 6% commission on the units they sell for $100 each, plus a fixed salary of $41,200 per person. Glade hopes that by increasing commissions to 11% and decreasing each salesperson’s salary to $21,200, sales will increase because salespeople will be more motivated. Currently, sales are 20,000 units. Glade’s other fixed costs, NOT including the salespeople’s salaries, total...
Glade, Inc. is trying to decide whether to increase the commission-based pay of its salespeople. Currently,...
Glade, Inc. is trying to decide whether to increase the commission-based pay of its salespeople. Currently, each of its five salespeople earns a 9% commission on the units they sell for $100 each, plus a fixed salary of $40,200 per person. Glade hopes that by increasing commissions to 14% and decreasing each salesperson’s salary to $21,100, sales will increase because salespeople will be more motivated. Currently, sales are 20,000 units. Glade’s other fixed costs, NOT including the salespeople’s salaries, total...
Glade, Inc. is trying to decide whether to increase the commission-based pay of its salespeople. Currently,...
Glade, Inc. is trying to decide whether to increase the commission-based pay of its salespeople. Currently, each of its five salespeople earns a 12% commission on the units they sell for $100 each, plus a fixed salary of $41,900 per person. Glade hopes that by increasing commissions to 17% and decreasing each salesperson’s salary to $21,600, sales will increase because salespeople will be more motivated. Currently, sales are 20,000 units. Glade’s other fixed costs, NOT including the salespeople’s salaries, total...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT