Programming Langaue(Python 3)
Define a function deal that will shuffle and distribute the 52 playing cards evenly to two players (26 each) and return a tuple of each player's hand (as a list of values). The function does not need to take in any arguments, and should create the deck of values internally (i.e., you should not need to input the deck of values into the function; you may reuse the statement you developed for part 6.1). You may assume that you are always playing with a standard deck (52 cards). You may make use of any NumPy functionality to perform the shuffle operation. Validate the operation of your function by dealing a hand to two players and displaying each player's hand along with their number of cards and the associated total value.
Testing code:
p1, p2 = deal() print('Player 1s hand:', p1, len(p1), sum(p1)) print('Player 2s hand:', p2, len(p2), sum(p2))
Player 1s hand: [1, 13, 6, 5, 4, 8, 11, 10, 1, 7, 2, 12, 10, 3, 12, 3, 9, 4, 9, 10, 5, 3, 9, 1, 7, 13] 26 178 Player 2s hand: [8, 5, 7, 13, 8, 6, 13, 5, 3, 2, 4, 4, 2, 6, 2, 1, 11, 6, 8, 12, 12, 7, 11, 11, 10, 9] 26 186