Question: Please make sure the code is in Python! Thank you! To simulate the playing of this game you will need to produce code for the

Please make sure the code is in Python! Thank you! Please make sure the code is in Python! Thank you! To simulatethe playing of this game you will need to produce code forthe following functions: (a) make_deck(seed-12345): This function has one argument seed that

To simulate the playing of this game you will need to produce code for the following functions: (a) make_deck(seed-12345): This function has one argument seed that may have value None or some positive integer. Its default value is 12345 The function will return a 1-dimensional NumPy array that contains a random shuffling of the integers from 1 to 54, inclusive. Each integer represents a card from the deck, according to the following ordering of the cards ace of clubs, 2 of clubs, ..., king of clubs, ace of diamonds, 2 of diamonds, ..., king of spades, joker0, jokerl. So, 1 represents the ace of clubs, 2 represents the 2 of clubs, 13 repre- sents the king of clubs, and so on. The numbers 53 and 54 represent the two jokers To shuffle the deck, you should use the NumPy random sub- module and the submodule function shuffle(). The statement import numpy.random as rand is at the top of the template and so the submodule will be available to use Using the seed value 12345, this should produce the following shuffled deck: 29, 41,40, 31,7,26, 34, 13,50, ..., 42,37,2, 30, 38, 35] The possible values for the argument seed are integers between 0 and 232 -1. In the template project.py, the statement rand.seed(seed) ap- pears just below the def statement for this function. Do not alter this statement

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!