Python

Python: Simple Playing Cards Program

In this video, we’re going to write a simple Python program to read a user input describing a playing card using shorthand notation, and prints the full description as follows.

Ranks:

A Ace
2…10 Card values
J Jack
Q Queen
K King

Suits:
D Diamonds
H Hearts
S Spades
C Clubs

The program should print the full description of the card.

For example:

Enter the card notation: QS

Output: Queen of Spades

Verified by MonsterInsights