Answered You can hire a professional tutor to get the answer.

QUESTION

//prntscr.com/laz7vx How do you generate a deck of cards that has 4 suits and 13 ranks, I used import random to start with but creating the function...

http://prntscr.com/laz7vx

How do you generate a deck of cards that has 4 suits and 13 ranks, I used import random to start with but creating the function body is what I'm struggling with.

The first number of the 3 digit number should be the suit 1,2,3,4 and the other 2 digits should be the rank of the card 1 to 13.

Example 213 would be the second suit with card rank 13.

The function should create the list in increasing order of rank not suit so 101 201 301 401 then 102 202 302 402 and so on. It should reach 13 as the highest rank but the function should also have a way to chose the rank of card you want to end it on (a number between 3 and 99).

The highest rank would be determined by the parameter.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question