@@ -0,0 +1,1719 @@
+from random import*%0A%0Aclass Card(object):%0A    def __init__(self, suit = None, value = None):%0A        self.value = value%0A%0Aclass Diamond(Card):%0A    def __init__(self):%0A        super(Diamond, self).__init__(%22Diamond%22, 4)%0A%0Aclass Heart(Card):%0A    def __init__(self):%0A        super(Heart, self).__init__(%22Heart%22, 3)%0A%0Aclass Club(Card):%0A    def __init__(self):%0A        super(Club, self).__init__(%22Club%22, 2)%0A%0Aclass Spade(Card):%0A    def __init__(self):%0A        super(Spade, self).__init__(%22Spade%22, 1)%0A%0A%0Aclass SuitGame(object):%0A    %22%22%22Contain methods for playing suit game%22%22%22%0A%0A    def __init__(self):%0A        self.cards = %5B%5D%0A%0A    def populate_deck(self):%0A%0A        self.cards +=  %5BDiamond() for i in range(13)%5D%0A        self.cards +=  %5BSpade() for i in range(13)%5D%0A        self.cards +=  %5BHeart() for i in range(13)%5D%0A        self.cards +=  %5BClub() for i in range(13)%5D%0A%0A        return self.cards%0A%0A    def remove_card(self, card):%0A%0A        if card in self.cards:%0A            self.cards.remove(card)%0A%0A        return self.cards%0A%0A%0A    def deal_hand(self):%0A        %22%22%22Returns a list of 4 randomly picked cards from our cards list%22%22%22%0A        # initialize a new card list%0A        new_cards = %5B%5D%0A        for i in range(4):%0A            index = randint(0,51)%0A            new_card = self.cards%5Bindex%5D%0A            self.remove_card(new_card)%0A%0A            new_cards.append(new_card)%0A%0A        return new_cards%0A%0A    def calculate_score(self):%0A        %22%22%22returns calculated value of cards%22%22%22%0A        new_cards = self.deal_hand()%0A        values = %5Bc.value for c in new_cards%5D%0A%0A        print values%0A%0A        score = sum(values)%0A%0A        print score%0A        return score%0A%0A%0A%0Adeck = SuitGame()%0Adeck.populate_deck()%0Adeck.deal_hand()%0Adeck.calculate_score()%0A%0A%0A

Create classes, score hand