# data[].attributes.body
– Can only be accessed within the function it was defined
– Exists until the function exists

# data[].attributes.body
self.x, self.y are instance variables
a, b are class variables

# data[].attributes.body
– Associated to individual objects and are unique to each other
– Local to the class and cannot be accessed outside of the class

# data[].attributes.body
class variable: a, b
instance variable: self.x, self.y
local variable: N/A

# data[].attributes.body
Class variable a and b
Instance variable self.x and self.y

# data[].attributes.body
Instance Variables - self, x, y

# data[].attributes.body
– Define outside the body of any methods in a class
– Global in scope and can be accessed both inside and outside of
the class

# data[].attributes.body
present object data values as a string for output

# data[].attributes.body
Local variable - scope is only in the function or block it is defined in. eg. if a variable is defined in any function other than a constructor

Instance variable - scope is one particular instance of a class. eg. the value of one particular card

Class variable - variable that is common to all instances of a class. e.g. count variable used keep track of total number of cards dealt.

# data[].attributes.body
string: classifies chracters

# data[].attributes.body
class Card:

# data[].attributes.body
class variable - a,b

# data[].attributes.body
Built in unction of python using for string representation.

# data[].attributes.body
Local variable --- that particular function or block of code

Instance variable --- particular instance of the class

Class variable --- any piece of code where the class in used

# data[].attributes.body
used allow the programmer to overload and to specify a string notation for a class

# data[].attributes.body
__str__(self):
return str(self.value) + " of " + self.suit