Different Errors In Python And Definitions