Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using python Exercisel Suppose you have been asked to write a program that calculates a 10 percent sales commission for several sales- persons. Although it

Using python
image text in transcribed
Exercisel Suppose you have been asked to write a program that calculates a 10 percent sales commission for several sales- persons. Although it would not be a good design, one approach would be to write the code to calculate one sales- person's commission, and then repeat that code for each salesperson. A better way is to use loop The following program shows how we might use a while loop to write the commission calculating program: COMPIT105s2Lab2 File EditFormat Run Options Window Help # Th15 program calculates ales commissions # create a variable to control the loop keep_goingy # Calculate a serie of commis os while keep_going # Get a salesperson's sales and commission rate sales-float (input ('Enter the amount of sales: comm rate -float (input('Enter the commission rate: ') # Calculate the commission commission -sales comm zate # Display the commission print ('The commission iS format (comission, . , . 2 f . ) , sep-.. ) # see if the user wants to do another one keep_going input ('Do you want to calculate another+\ commission (Enter y tor yes): Enter the amountf 5&les: 10000.00 Enter the commission rate: 0.10 The commission is 1,000.00 Do you want to calculate another commission (Enter y for yes): y Enter the amount of sales: 15000 Enter the commission rate: 0.15 The commission is $2,250.00 Do you want to calculate another commission (Enter y for yes): |

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

1. Socialization policy in mass media?

Answered: 1 week ago

Question

1. What is employment? 2. What is the rewards for employment?

Answered: 1 week ago

Question

1. What is meant by Landslide? 2.The highest peak in Land?

Answered: 1 week ago