Python class and main function not running? : <pre><code>#Homework 10 Question 6 Zachariah Huckstep
#Employee Management System

#Employee Class
class Employee():
    #Init method
    def __init__(self,empName,empID,empDept,empTitle):
        #Set self name, id number, department and job title
        self.name=empName
        self.idnum=empID
        self.dept=empDept
        self.title=empTitle

    #set_name method
    def set_name(self,empName):
        #Set the name
        self.__empName=empName

    #set_idnum method
    def set_idnum(self,empID):
        #Set the id number
        self.__empID=empID

    #set_dept method
    def set_dept(self,empDept):
        #Set the department
        self.__empDept=empDept

    #set_title method
    def set_title(self,empTitle):
        #Set the title
        self.__empTitle=empTitle

    #get_name method
    def get_name(self):
        #Get the name
        return self.__empName

    #get_idnum method
    def get_idnum(self):
        #Get the id number
        return self.__empID

    #get_dept method
    def get_dept(self):
        #Get the department
        return self.__empDept

    #get_title method
    def get_title(self):
        #Get the title
        return self.__empTitle

    #__str__ method
    def __str__(self):
        #Return object state as a string
        return "Name: "+self.__empName+\
               "\nID Number: "+self.__empID+\
               "\nDepartment: "+self.__empDept+\
               "\nJob Title: "+self.__empTitle

#Start of program
import pickle

#Menu choices
lookup=1
add=2
change=3
delete=4
quit=5

#File name
fileName='staff.db'

#main function
def main():
    #Load the existing employee database as a dictionary
    #and assign it to staff
    staff=load_staff()

    #Set users option
    opt=0

    #Process menu options until quit
    while opt != quit:
        #Get the user's menu option
        opt=get_menu_option()

        #Decide what to do
        if opt == lookup:
            lookup(staff)
        elif opt == add:
            add(staff)
        elif opt == change:
            change(staff)
        elif opt == delete:
            delete(staff)

    #Save staff dictionary to staff.db
    save_staff(staff)

#Load staff function
def load_staff():
    #Try opening staff.db
    try:
        #Open the staff.db file
        file=open(fileName,'rb')

        #Unpickle the dictionary
        staff_dct=pickle.load(file)

        #Close the staff.db file
        file.close()
    except IOError:
        #Could not find file, so make an
        #empty dictionary
        staff_dct={}

    #Return the staff database as a dictionary
    return staff_dct

#Print menu options and get opt
def get_menu_option():
    #Print menu
    print()
    print('Menu:')
    print('1. Look up an employee')
    print('2. Add a new employee')
    print('3. Change an existing employee')
    print('4. Delete an employee entry')
    print('5. Quit the Employee Management System')
    print()

    #Get opt
    opt=int(input('=&gt;'))

    #Validate opt
    while opt &lt; lookup or choice &gt; quit:
       #Get valid opt
       opt=int(input('Enter valid choice: '))

    #Return opt
    return opt

#Lookup function
def lookup(staff):
    #Ask for the employee ID
    empID=input('Enter empoyee ID: ')

    #Search employee database for employee ID
    print(staff.get(empID,'Invalid ID Number.')

#Add function
def add(staff):
    #Ask for employee info
    print('Please enter the following new employee information:')
    empName=input('Name: ')
    empID=input('ID Number: ')
    empDept=input('Department: ')
    empTitle=input('Job Title: ')

    #Create a current employee object named currEmp
    currEmp=Employee(empName,empID,empDept,empTitle)

    #If the ID number is invalid, add it as a key
    #with the currEmp object as the value
    if empID not in staff:
        #Add currEmp into staff
        staff[empID]=currEmp
        print('New employee added.')
    else:
        #Print error
        print('That employee ID already exists.')

#Change function
def change(staff):
    #Ask for employee ID
    empID=input('Enter Employee ID: ')

    if empID in staff:
        #Ask for new name
        empName=input('Enter new name: ')
        #Ask for new department
        empDept=input('Enter new department: ')
        #Ask for new job title
        empTitle=input('Enter new job title: ')

        #Create an employee object named currEmp
        currEmp=Employee(empName,empID,empDept,empTitle)

        #Update the employee information
        staff[empID]=currEmp
    else:
        #Print error
        print('Error: Invalid employee ID.')

#Delete function
def delete(staff):
    #Ask for employee ID
    empID=input('Enter employee ID: ')

    #If the employee ID is found, delete it from staff
    if empID in staff:
        #Delete it
        del staff[empID]
        print('Employee deleted from database.')
    else:
        #Print error
        print('Error: Invalid employee ID.')

#Save staff function
def save_staff(staff):
    #Pickle the staff object and save it to staff.db
    #Open file for writing
    file=open(fileName,'wb')

    #Pickle staff database and save it
    pickle.dump(staff,file)

    #Close the file
    file.close()

#Call the main function
main()
</code></pre>

<p>This program is an Employee Management System, I wrote it all out last night, and now I can't run it. It is having trouble running at line 154 (the Add function)</p>

<p>Python is telling me this:
def add(staff):
  ^
SyntaxError: Invalid syntax</p>

<p>Please help.</p>
