Shared Flashcard Set

Details

Python
Programming Language
38
Computer Science
Professional
05/08/2013

Additional Computer Science Flashcards

 


 

Cards

Term
Class
Definition
tells python to make anew kind of things
Term
object
Definition
the most basic kind of class or any instance of some thing
Term
instance
Definition
what you get as a result of a class
Term
def
Definition
how u define a function
Term
self
Definition
Inside the functions in a class, self is a variable for the instance/object being accessed.
Term
inheritance
Definition
The concept that one class can inherit traits from another class
Term
composition
Definition
the concept that a class can be composed of other classes as parts
Term
attribute
Definition
a property classes have that a re from compositions and usually are variables
Term
is-a
Definition
a phrase to say that something inherits from another. ex: a salmon is-a fish
Term
has-a
Definition
a phrase to say that something is composed of other things or has a trait. ex: a salmon has-a mouth
Term
class X(Y)
Definition
Make a class named X that is-a Y"
Term
class X(object): def__init__(self, J)
Definition
"class X has-a __init__that takes self and J parameters"
Term
class X(object): def M(self, J)
Definition
"class X has-a function named M that takes self and J parameters."
Term
foo = X()
Definition
"Set foo to an instance of class X"
Term
foo.M(J)
Definition
"From foo get the M function, and call it with parameters self, J."
Term
foo.K = Q
Definition
From foo get the K attribute and set it to Q."
Term
not False
Definition
True
Term
not True
Definition
False
Term
True or False
Definition
True
Term
True or True
Definition
True
Term
False or True
Definition
True
Term
False or False
Definition
False
Term
True and False
Definition
False
Term
True and True
Definition
True
Term
False and True
Definition
False
Term
False and False
Definition
False
Term
not(True or False)
Definition
True
Term
not(True or True)
Definition
False
Term
not(False or True)
Definition
True
Term
not(False or False)
Definition
True
Term
1 != 0
Definition
True
Term
1 != 1
Definition
False
Term
0 != 1
Definition
True
Term
0 != 0
Definition
False
Term
1 == 0
Definition
False
Term
1 == 1
Definition
True
Term
0 == 0
Definition
True
Term
0 == 1
Definition
False
Supporting users have an ad free experience!