Question: Task: To complete this assignment, you should write a Python program that allows users to input a number of cards to be dealt from a
Task: To complete this assignment, you should write a Python program that allows users to input a number of cards to be dealt from a deck of cards. The cards should be randomly shuffled before dealing.
- Shuffle the deck of cards after the instructions and description are output to the user HINT: Research importing and utilizing modules (Links to an external site.)Links to an external site. in your code, specifically examining the random (Links to an external site.)Links to an external site. module
- Output a welcome message describing the application for the user and any/all instructions
- Output a description of the deck of cards (e.g., this deck contains X number of cards and Y number of suits); do this programmatically and professionally.
- Ask the user for the number of cards to be dealt to them from the deck
- Check to ensure they've given you a valid number that can be dealt (if you want, you can limit it to a set of numbers -- but be sure to tell the user in the instructions if this is the case)
- If the number is valid, store their request in a variable and name the variable appropriately
- Output a few blank lines using the special code to insert a new line
- Output the results from the user's request, displaying each card number and suit in a list-like fashion.
- Ask them if they want to be dealt another hand or if they would like to quit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
