Error in Python

Discussion in 'Python' started by Glendor, Oct 1, 2012.

  1. Glendor

    Glendor

    Joined:
    Oct 1, 2012
    Messages:
    1
    Likes Received:
    0
    I am getting an error in python for a prgram that I am writing for school. I am 5 weeks in the course so it is very basic but I cannot figure out what is wrong.

    The program is not yet done but I want to test it out to see everything works so far.
    The problem is in the third line. It gives me a syntax error : Invalid syntax(<module1>, line3)

    def main():
    a_seats = (input("Enter number of A tickets sold")
    b_seats = (input("Enter number of B tickets sold")
    c_seats = (input("Enter number of C tickets sold")
    compute_A_seats(a_seats)
    compute_B_seats(b_seats)
    compute_C_seats(c_seats)

    def compute_A_seats(a_seats):
    int(a_seats)
    totalaseats = a_seats * 15

    def compute_B_seats(b_seats):
    int(b_seats)
    totalbseats = b_seats * 12

    def compute_C_seats(c_seats):
    int(c_seats)
    totalcseats = c_seats * 9
     
    Glendor, Oct 1, 2012
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.