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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly