Classes and Objects Flashcards

1
Q

Constructor

A

Special method named __init__ in a class that is automatically called when an object is created. Used for initializing instance variables.

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

Instance Variable

A

A variable that is bound to an instance of a class.

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

Method

A

A function defined within a class.

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

Parameter

A

A variable in a method definition that is used to pass information into a method.

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

Return

A

The keyword used in a method to indicate the value that the method should return when it is called.

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

Print

A

Used to display messages or values on the console.

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

Snake Case

A

Naming convention where words are separated by underscores, e.g., test_recycling_scheme.

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

Camel Case

A

Naming convention where words are joined without spaces, and each word, except the first, starts with a capital letter, e.g., testRecyclingScheme.

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

Instance:

A

An individual occurrence of an object created from a class.

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

IDE (Integrated Development Environment):

A

Software that provides comprehensive facilities to programmers for software development. Like VS Code

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