File Edit Format Run Options Window Help dCardNames dCardValues ['2', '3', '4', '5', '6', = ['2', '3', '4', '5', '6' dSuits = ["Clubs", "Spades", "Diamonds", "Hearts"] # Build a two dimensional deck with Cards suits and values. aCards = [[¹' for i in range (52)] for j in range (3)] i = 0 n = 0 while i < 13: i = 0 while aCards [0] [i] aCards [0] [i+13] aCards [0] [i + 26] aCards [0] [i + 39] = dCardNames[i] i=i+1 aCards [1] [i] = dSuits [0] aCards [1] [i+13] aCards [1] [i+26] = dSuits [2] aCards [1] [i + 39] aCards [2] [i] aCards [2] [i+13] = = dSuits [3] dCardValues [i] dCardNames[i] dCardNames [i] dCardNames[i] dSuits [1] i < 52: print (aCards [0] [i], i = i + 1 '9', '10', 'J', 'Q','K','A'] '8', '9', '10', '10', '10', '10', '11'] " aCards [2] [i+26] =dCardValues[i] aCards [2] [i + 39] = dCardValues[i] dCardValues[i] " aCards [1] [i], " aCards [2] [i])
File Edit Format Run Options Window Help dCardNames dCardValues ['2', '3', '4', '5', '6', = ['2', '3', '4', '5', '6' dSuits = ["Clubs", "Spades", "Diamonds", "Hearts"] # Build a two dimensional deck with Cards suits and values. aCards = [[¹' for i in range (52)] for j in range (3)] i = 0 n = 0 while i < 13: i = 0 while aCards [0] [i] aCards [0] [i+13] aCards [0] [i + 26] aCards [0] [i + 39] = dCardNames[i] i=i+1 aCards [1] [i] = dSuits [0] aCards [1] [i+13] aCards [1] [i+26] = dSuits [2] aCards [1] [i + 39] aCards [2] [i] aCards [2] [i+13] = = dSuits [3] dCardValues [i] dCardNames[i] dCardNames [i] dCardNames[i] dSuits [1] i < 52: print (aCards [0] [i], i = i + 1 '9', '10', 'J', 'Q','K','A'] '8', '9', '10', '10', '10', '10', '11'] " aCards [2] [i+26] =dCardValues[i] aCards [2] [i + 39] = dCardValues[i] dCardValues[i] " aCards [1] [i], " aCards [2] [i])
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 8E: Open the Calories Solution.sln file contained in the VB2017\Chap08\Calories Solution folder. Open...
Related questions
Question
In the attached Python code, use the array built to shuffle and deal two poker hands. Change the corresponding values for all Jacks through Aces to 11, 12, 13, 14 respectively.
Shuffle the deck, then deal two hands. Comment (explain) your code.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 8 steps with 6 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT