Question: Problem Description Write a program that simulates a deck of cards. There are 52 cards in a deck. A deck consists of four suits (Diamonds,

 Problem Description Write a program that simulates a deck of cards.
There are 52 cards in a deck. A deck consists of four

Problem Description Write a program that simulates a deck of cards. There are 52 cards in a deck. A deck consists of four suits (Diamonds, Hearts, Clubs and Spades). Each suit contains 13 values (Ace, 2, 3, 4, 5, 6, 7, 8,9, 10, Jack, Queen and King). The user will indicate how many cards they wish to draw from a deck of cards. Your program will ther draw that many cards and then display the suits and values of all the cards drawn. You can assume you are drawing with replacement, which means you put each card back into the deck after drawing it. Example Run Num cards? 1e0 queen of spades 7 of diamonds 6 of diamonds 9 of clubs 2 of hearts jack of spades 5 of hearts ace of hearts jack of clubs queen of hearts jack of clubs jack of hearts 1e of diamonds 7 of spades 9 of clubs 9 of diamonds 6 of diamonds 8 of clubs jack of hearts 1e of hearts 8 of spades 7 of hearts 6 of diamonds 5 of spades king of clubs 5 of spades 1e of hearts king of diamonds 5 of diamonds 3 of spades

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!