(Week 7) Python Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the two kinds of data attributes?

A

Class Variables & Instance Variables

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

What are class variables?

A

Variables declared inside the class but outside any instance methods. Shared across all the objects of the class. Modifying a class variable affects all the object instances at the same time

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

What are instance variables?

A

Variables declared inside the constructor of the class. They are tied to the particular object instance of the class

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