# Card.py class Card(object): '''A simple playing card. A Card is characterized by two components: rank: suit ''' def __init__(self, rank, suit): '''Constructor pre: rank, suit are appropriate for the chosen representation post: self has the given rank and suit''' def suit(self): '''Card suit post: Returns the suit of self as represented''' def rank(self): '''Card rank post: Returns the rank of self as represented''' def suitName(self): '''Card suit name post: Returns one of ('clubs', 'diamonds', 'hearts', 'spades') corrresponding to self's suit.''' def rankName(self): '''Card rank name post: Returns one of ('ace', 'two', 'three', ..., 'king') corresponding to self's rank.''' def __str__(self): '''String representation post: Returns string representing self, e.g. 'Ace of Spades' '''