My first Program 06-18-2014, 02:46 PM
#1
Here is my First Program.
Basically all it does it Shuffles a deck of cards, an easy beginner program. any suggestions on how I could improve it?
Thanks to @Ex094 for his awesome beginners Python tutorial!
source included.
Basically all it does it Shuffles a deck of cards, an easy beginner program. any suggestions on how I could improve it?
Thanks to @Ex094 for his awesome beginners Python tutorial!
source included.
Code:
#Program created by Root@LocalHost
#Thanks to Exo94 for his awesome python help
#This program will shuffle a deck of cards
import itertools, random
#here is the deck of cards, Call them whatever you like.
deck = list(itertools.product(range(1,14), ['spade', 'heart', 'diamond', 'club']))
#this bit will shuffle the deck of cards
random.shuffle(deck)
#This will draw(how many cards you like)
print('You got:')
for i in range(3):
print(deck[i][0], "of", deck[i][1])

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)


Hook me up with a PM if ya need any further help..
mile:

![[Image: qJweLN6.jpg]](http://i.imgur.com/qJweLN6.jpg)