Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1 2 please answer what print in each lines my deck. display() unshuffled deck A4

ID: 3850747 • Letter: 1

Question

1

2

please answer what print in each lines

my deck. display() unshuffled deck A4 24 34 44 54 64 74 84 94 104 J4 Q4 K4 A. 24 3. 4. 54 64 74 84 94 10% J+ Q4 K4 my deck. shuffle my deck. display shuffled deck H 10 K J+ 84 J+ 54 Q4 44 94 v 104 5 cardi my deck deal print First card dealt from the deck cardi H Line 1 print card suit: card 1. suit 0 Line 2 print "Card rank: N, c 1. rank Line 3 print "Card value: cardi. value Line 4 print. Deck empty? my deck. is empty 0 Line 5 print "Number of cards left in deck: M, len (my deck) Line 6

Explanation / Answer

Please find the outputs below(I have used names of card suits instead of images) :

Output

1.

First card dealt from deck: Q Diamond #line 1 : because this is the last card of the shuffled deck displayed.

Card suit: Diamond #line 2 : suit of the card

Card rank: 12 #line 3 : rank of the card where A being 1 and K being 13

Card value: Q #line 4 : value of the dealt card

Deck Emplty? False #line 5 : deck is still containing 51 cards.

Number of cards left in deck: 51 #line 6 : printing numbers of cards left ie 51

2.

Second card dealt from the deck: J Spades #line 1 : cards are being picked up from top of deck and last card is j of spades.

False #line 2 : suits of card 1 and card 2 are not same

True #line 3 : rank of card 1 ie 12 is greater than rank of card 2 ie 11

False #line 4 : value of card 1 and card 2 are not equal.

Please let me know if you face any difficulties while understanding the answer.

Please vote up if you are satisfied with the answer.