Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Python pls)Build a two dimensional array out of the following three lists. The array will represent a deck of cards. The values in dCardValues correspond

(Python pls)Build a two dimensional array out of the following three lists. The array will represent a deck of cards. The values in dCardValues correspond to the card names in dCardNames. Note that when you make an array all data types must be the same. Apply dSuits to dCardValues and dCardNames by assigning a suit to each set of 13 elements.

dCardNames = ['2','3','4','5','6','7','8','9','10','J','Q','K','A']

dCardValues = ['2','3','4','5','6','7','8','9','10','11','12','13','14']

dSuits = ["Clubs","Spades","Diamonds","Hearts"]

Once assigned your two dimensional array should resemble this :

2 Clubs 2 3 Clubs 3 4 Clubs 4 5 Clubs 5 6 Clubs 6 7 Clubs 7 8 Clubs 8 9 Clubs 9 10 Clubs 10 J Clubs 10 Q Clubs 10 K Clubs 10 A Clubs 11 2 Spades 2 3 Spades 3 4 Spades 4 5 Spades 5 6 Spades 6 7 Spades 7 8 Spades 8 9 Spades 9 10 Spades 10 J Spades 10 Q Spades 10 K Spades 10 A Spades 11 2 Diamonds 2 3 Diamonds 3 4 Diamonds 4 5 Diamonds 5 6 Diamonds 6 7 Diamonds 7 8 Diamonds 8 9 Diamonds 9 10 Diamonds 10 J Diamonds 10 Q Diamonds 10 K Diamonds 10 A Diamonds 11 2 Hearts 2 3 Hearts 3 4 Hearts 4 5 Hearts 5 6 Hearts 6 7 Hearts 7 8 Hearts 8 9 Hearts 9 10 Hearts 10 J Hearts 10 Q Hearts 10 K Hearts 10 A Hearts 11

Once you have this two dimensional array, you should shuffle it either by function or by code to produce a shuffled deck of cards. After that apply the three sorts (Selection, Insertion and Bubble) ,to the two dimensional array returning it to it original state as listed above. This assignment will require some problem solving ability.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions