Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Error in Python

Reply
Thread Tools

Error in Python

 
 
Glendor Glendor is offline
Junior Member
Join Date: Oct 2012
Posts: 1
 
      10-01-2012
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 ASP .Net 2 03-27-2006 08:43 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error JavaQueries Java 1 03-01-2005 06:30 PM



Advertisments