In your main method, you call
calculatedsales()
without arguments, but that function expects three arguments. I assume you want to pass the inputted values to that function. In that case, try this:
def main():
intro()
section_a, section_b, section_c = readinput()
calculatedsales(section_a, section_b, section_c)
Also, there are some syntax and indentation errors in your code: Python has strict indentation rules, and there are also some missing parentheses in the code. Here is the code with the TypeError fixed and with correct syntax and indentation:
def main():
intro()
section_a, section_b, section_c = readinput()
calculatedsales(section_a, section_b, section_c)
def intro():
print("welcome to the ticket sales program")
print("the cost of each seat is as follows, seat a=15, seat b=12, seat c=9")
def readinput():
section_a = int(input("how many tickets sold for section a="))
section_b = int(input("how many tickets sold for section b="))
section_c = int(input("how many tickets sold for section c="))
return (section_a,section_b,section_c)
def calculatedsales(section_a, section_b, section_c):
sales_a = section_a*15
sales_b = section_b*12
sales_c = section_c*9
total_sales = sales_a + sales_b + sales_c
print("total sales = {0:.2f}".format(total_sales))
main()