• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/16

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

16 Cards in this Set

  • Front
  • Back
Class
Tells Python to make a new king of thing
Object
Most basic kind of thing OR any instance of some thing.
instance
What you get when you tell Python to create a class
Def
How you define a function inside a class
Self
Inside the functions in a class, self is a variable for the individual instance/object being accessed.
Inheritance
The concept that one class can inherit traits form another class. e.g. me and my parents
Composition
The concept that one class can be composed of other classes as parts. e.g. car has wheels
Attribute
A property classes have that are from composition are usually variables
is-a
Something inherits from another
has-a
Something is composed of other things or has a trait
class X(Y)
"make class named X that is-a Y"
class X(object): def __init__(self, J)
"class X has-a __init__ that takes self and J as parameters.
class X(object): def M(self, J)
"class X has-a M funciton that takes self and J as parameters"
foo = X()
"set foo to an instance of class X"
foo.M(J)
"from foo get function M and call it with parameter J"
foo.K = Q
"from foo get the K attribute and set it to Q"