Reference no: EM132356923
Question
You need help with the following in python:
-Create two parallel arrays that represent a standard deck of 52 playing cards.
-One array is a string and holds the values (Ace, 2,3,4,5,6,7,8,9,10,Jack,Queen,King).
-The other array is a string array that holds suits (Clubs, Diamonds, Hearts, and Spades).
-Create an array that holds all 52 cards.
-Display all cards from the created deck array.
-Shuffle the 52 card array.
-Display all cards from the shuffled deck
-Create the flowchart for the program in a Word document
-Create the pseudocode for the program in a Word document or a PDF file.
-------------------------------------
you have already come up with the following
import random
suits = ["clubs", "diamonds", "hearts", "spades"]
cards = ["ace","2","3","4","5","6","7","8","9","10","jack","queen","king"]
deck = []
count = 0
for suit in range (0,4):
for card in range(0,13):
deck.append(cards[card] + "-" + suits [suit])
print(deck[count])
count = count + 1
print("----------------------------")
for cardIndex in range (0,51):
s = random.randint(0, 3)
c = random.randint (0,12)
temp = suits[s] + cards[c]
if temp in deck:
deck.append(temp)
for cardindex in range(0,51):
print(deck[cardIndex])