I'm getting a syntax error at the first if statement in my commission statement, indicated with carat. Thank you for your time in advance. It's probably something simple i'm still pretty new at this.
Code:
def sales():
amount = int(input('Enter the monthly sales:'))
return amount
def advance_pay():
advance = int(input('Enter the amount of advance pay, or enter 0 if no advance pay was given'))
return advance
def commission():
comm =
if amount() < 10000:
[B]^[/B]this is where i'm getting the error.
com = .10
if 10000<= amount() <= 14999.99:
com = .12
if 15000 <= amount() <=17999.99:
com = .14
if 18000 <= amount() <= 21999.99:
com = .16
else:
com = .18)
return comm
def pay_out():
pay = amount*com - advance
return pay
def main():
again = 'yes'
while again == 'yes':
amount()
advance()
comm()
pay()
print ('The pay is:$', pay)
if pay < 0:
print ('The salesperson must reimburse the company.')
again = input('Do you want to calculate another commission (yes/no):')
main()
Comment