Journal 13

20130718-89a718ff85be19c11c3b23029d6df275c65dd9a127126bc96e1924b-1024 This is a code for a very simplified game of blackjack, I used two new modules itertools for looping and a random module. Essentially this should pull out two cards of a different number and different suit. The numbers for the cards are labeled 1 – 13.

11 being Jack, 12 Being Queen, 13 Being King.

import pygame, itertools, random
deck = list(itertools.product(range(1,14), [‘Spade’,’Heart’,Diamond’,’Club’]))

print(” You cards are:”)
for i in range(2):
print (deck [i] [0], “of, deck[i] [1])



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s