Question: Write a python program to perform the following the following card trick. The program must deal out the cards in three columns, row by row.

Write a python program to perform the following the following card trick. The program
must deal out the cards in three columns, row by row.
Ace of Hearts Jack of Spades7 of Clubs
2 of Spades2 of Spades3 of Spades
3 of Diamonds4 of Diamonds10 of Hearts
10 of Clubs8 of Hearts9 of Diamonds
Jack of Hearts9 of Clubs Jack of Clubs
Queen of Clubs Queen of Hearts King of Diamonds
7 of Diamonds King of Spades6 of clubs
Your program should repeat this process twice more (selecting the column, picking up and re-dealing). Then the program must deal out the first ten cards in the deck and declare the eleventh card as the secret card. Program Requirements
Your program must generate its own random deck of cards using the following technique:
generate a random integer (using the randint() function) for each card
display a string value for each card ("Ace of Diamonds")
Each value must be converted to the format of as done in the example
above. Whenever your program displays the cards they must line up on the word "of".
Your program must deal the cards out by row and pick them up by column (3 times
to make it work properly).
Your program must ask the player is he/she wants to printout the entire deck
before playing. Each card must be printed out formatted as above. Your program code must be logically organized using functions. Source code and sample output of what the code should look like is attached. The pseudocode as well as print code lines must be utilized in the final program.
Write a python program to perform the following

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 Programming Questions!