-3

I'm having trouble creating a String that will allow my numbers in a 5 Hand Poker Assignment turn into words. The numbers are from 1 to 52, represent each card in the deck. Ace of Spades in 1, 2 of Spades is 2... 14 is Ace of Clubs... 27 is Ace of Diamonds... and 40 is Ace of Hearts, etc. I want to print out the number to their according card. What is the code for this?

1 Answers1

0
  1. Define an array/list

    cards=["Ace of Spade", "Two of Spade, ... ]

2.Create string

String = cards[number]

3 Do it again for all cards and print result

Walle Cyril
  • 3,087
  • 4
  • 23
  • 55