edited to include functions
edited to include function for syntax error
edited to include function for Name Error
edited to include function for Attribute Error