Using Python 2.7 goals: Build a single-dimension array to keep track of the location of every card DO NOT move cards around… Just use the array to keep track of where each card is All card data is really integers – Use other arrays to translate integers to suits, ranks, and player names All cards will start in the DECK Write a function that translates a card number to a card name. HINT – look at the suitName and rankName arrays Write a function to assign a card to a given player Dealing a card involves picking a card number and assigning a new location to the corresponding element of cardLoc Write a function that displays the location of every card. (Early versions should show numeric values for the card number and location. Later versions can include string values for prettier output.) Write a function that prints the name of every card in a given hand Hints Most people make this way too complicated You don’t need any arrays I didn’t already give you Do not use a two-dimensional array (unless you want to for the blackbelt challenge) Computer memory doesnotwork like actual cards. You are not moving things around. starter Code DO NOT CHANGE “”” cardGame.py basic card game framework keeps track of card locations for as many hands as needed “”” from random import * NUMCARDS = 52 DECK = 0 PLAYER = 1 COMP = 2 cardLoc = [0] * NUMCARDS suitName = (“hearts”, “diamonds”, “spades”, “clubs”) rankName = (“Ace”, “Two”, “Three”, “Four”, “Five”, “Six”, “Seven”, “Eight”, “Nine”, “Ten”, “Jack”, “Queen”, “King”) playerName = (“deck”, “player”, “computer”) def main(): clearDeck() for i in range(5): assignCard(PLAYER) assignCard(COMP) showDeck() showHand(PLAYER) showHand(COMP)
Posted on by admin
Using Python 2.7 goals Build a single-dimension array to keep track of the location of every card DO NOT move cards around… Just use the array to keep track of where each card is All card data is really integers – Use other arrays to translate integers
WHAT OUR CURRENT CUSTOMERS SAY

- Google

- Sitejabber

- Trustpilot
Zahraa S
Absolutely spot on. I have had the best experience with Elite Academic Research and all my work have scored highly. Thank you for your professionalism and using expert writers with vast and outstanding knowledge in their fields. I highly recommend any day and time.
Stuart L
Thanks for keeping me sane for getting everything out of the way, I’ve been stuck working more than full time and balancing the rest but I’m glad you’ve been ensuring my school work is taken care of. I'll recommend Elite Academic Research to anyone who seeks quality academic help, thank you so much!

Mindi D
Brilliant writers and awesome support team. You can tell by the depth of research and the quality of work delivered that the writers care deeply about delivering that perfect grade.

Samuel Y
I really appreciate the work all your amazing writers do to ensure that my papers are always delivered on time and always of the highest quality. I was at a crossroads last semester and I almost dropped out of school because of the many issues that were bombarding but I am glad a friend referred me to you guys. You came up big for me and continue to do so. I just wish I knew about your services earlier.

Cindy L
You can't fault the paper quality and speed of delivery. I have been using these guys for the past 3 years and I not even once have they ever failed me. They deliver properly researched papers way ahead of time. Each time I think I have had the best their professional writers surprise me with even better quality work. Elite Academic Research is a true Gem among essay writing companies.
Got an A and plagiarism percent was less than 10%! Thanks!


Jermaine Byrant
Nicole Johnson



