Chapter 3: How to be a Successful Programmer Flashcards
Learn the meaning of common Python error messages.
1
Q
ParseError
A
Parse errors happen when you make an error in the syntax of your program. Python can’t figure out what you are trying to say.
2
Q
TypeError
A
Type errors occur when you you try to combine two objects that are not compatible. For example you try to add together an integer and a string.
3
Q
NameError
A
Name errors almost always mean that you have used a variable before it has a value. Often NameErrors are simply caused by typos in your code.
4
Q
ValueError
A
Value errors occur when you pass a parameter to a function and the function is expecting a certain type, but you pass it a different type.