classes in python Flashcards

1
Q

methods

A

a function that belongs to a certain object - the functions that can be found within one class are also referred to as “methods”

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

instances

A

an object of a certain class; a copy of the class with actual values plugged in

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

__init__ method

A

used for setting the default state of an instance; also known as the constructor

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

objects

A

anything in a python program is an object. each object has a type, such has string, int, list, etc.

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

classes

A

templates for creating python objects

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

class variables

A

variables created inside of a class but outside of any method

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

are init methods a type of instance method?

A

no

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

inheritance

A

defining a class that inherits everything from another class

parent class/base class: class that is being inherited from

child class/derived class: class that inherits the functions and properties

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

overriding

A

when the child class replaces the value of something defined in the parent class

(similar IDs in css overriding the properties of a class)

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