Question: Question 2 The main ( ) function template is provided below. You must use the main function template to write the functions that are called
Question The main function template is provided below. You must use the main function template to write the functions that are called in the main function to produce these outputs. Your test run output must be exactly the same as specified below or a zero will be given for this question. Sample test runs user input in blue Test run Enter the monthly sales: Enter the amount of advanced pay, or enter if no advanced pay was given. Advanced pay: The pay is $ Test run Enter the monthly sales: Enter the amount of advanced pay, or enter if no advanced pay was given. Advanced pay: The pay is $ Test run Enter the monthly sales: Enter the amount of advanced pay, or enter if no advanced pay was given. Advanced pay: The pay is $ The salesperson must reimburse the company. Here is the template for the main function, you must use this main template, copy and paste into Python IDLE. Requirements for the determinecommrateis found below the template. You are not allowed to change anything in the main function template add delete or change Changing any single piece of code in the given main function template will result in a zero for this question. The main function must be placed at the bottom after all other functions. Write the getsales getadvancedpay and determinecommrate functions # This program calculates a salesperson's pay def main: # Get the amount of sales from user sales getsales # Get the amount of advanced pay from user. advancedpay getadvancedpay # Determine the commission rate. commrate determinecommratesales # Calculate the pay. pay sales commrate advancedpay # Display the amount of pay. printThe pay is $ formatpayf sep # Determine whether the pay is negative. if pay : printThe salesperson must reimburse' printthe company. Q continued... Requirements for the function determinecommrate rate Sales less than Sales from to Sales from to Sales from to Sales greater than
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
