Question: I tried to run this code in python, and I am expecting the following output. I am getting no prompts or output when I try

I tried to run this code in python, and I am expecting the following output. I am getting no prompts or output when I try to run this code.
Program Output (with input shown in bold) Enter the monthly sales: 14650.00 Enter the amount of advanced pay, or enter 0 if no advanced pay was given. Advanced pay: 1000.00 The pay is $758.00.
Program Output (with input shown in bold) Enter the monthly sales: 9000.00 Enter the amount of advanced pay, or enter 0 if no advanced pay was given. Advanced pay: 0 The pay is $900.00.
Program Output (with input shown in bold) Enter the monthly sales: 12000.00 Enter the amount of advanced pay, or enter 0 if no advanced pay was given. Advanced pay: 2000.00 The pay is $560.00. The salesperson must reimburse the company.
The code that I am attempting to run is below
### START OF CODE
# This program calculates a salesperson's pay
# at make your own music
def main():
# get the amount of sales
sales = get_sales()
# get the amount of advanced pay
advanced_pay = get_advanced_pay()
# Determine the commission rate
comm_rate = determine_comm_rate(sales)
# calc pay
pay = sales * comm_rate - advanced_pay
# display the amount of pay
print(f'The pay is ${pay:,.2f}.')
# determine whether the pay is negative
if pay <0:
print('The salesperson must reimburse')
print('the company')
# the get_sales function gets a salesperson's
# monthly sales from the user and returns that value
def get_sales():
# get the amount of monthly sales
monthly_sales = float(input('Enter the monthly sales: '))
# Return the amount entered
return monthly_sales
# The get_advanced pay function gets the amount of
# advanced pay given to the salesperson and returns
# that amount
def get_advanced_pay():
# get the amount of advanced pay
print('Enter the amount of advanced pay, or')
print('enter 0 if no advanced pay was given.')
advanced = float(input('Advanced pay: '))
# return amount entered
return advanced
# The determine_comm_rate function accepts the
# amount of sales as an argument and returns the
# applicable commission rate.
def determine_comm_rate(sales):
# determine the commission rate
if sales <10000.00:
rate =0.10
elif sales >=10000 and sales <=14999.99:
rate =0.12
elif sales >=15000 and sales <=17999.99:
rate =0.14
elif sales >=18000 and sales <=21999.99:
rate =0.16
else:
rate =0.18
# return the comm rate
return rate
### END OF CODE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!