Question: Part I: Create Deck of Cards (10 points) Write a function create.deck that creates and returns a list of 52 Card objects in the order

 Part I: Create Deck of Cards (10 points) Write a function

Part I: Create Deck of Cards (10 points) Write a function create.deck that creates and returns a list of 52 Card objects in the order specified below. The function takes no arguments. A Card has a rank in the range 0 through 12 and a suite in the range 0 through 3. A card showing a 2 is represented by ID #0, 3 is represented by ID #1, , 10 is represented by ID #8; and the Jack, Queen, King and Ace are represented by 9, 10, 11 and 12, respectively: Rank Number Assigned 0 10 Suits are assigned ID numbers as follows: Number Assigned 0 Suit CLUBS SPADES DIAMONDS 2 HEARTS 3 For example, a Card that represents the Queen of Clubs will have 0 for its suit attribute and 10 for its rank attribute The create.deck () constructs and returns a list of 52 Card objects. The cards are returned in the following order: all of the Clubs in the order 2 through Ace, followed by all of the Spades in the order 2 through Ace, followed by CSE 101 - Spring 2018 Homework #5 Page 2 all of the Diamonds in the order 2 through Ace, followed by e all of the Hearts in the order 2 through Ace

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!