Playing Cards

Implement a class Card to represent a playing card. Your class should have the following methods: Note: A method named __str__ is special in Python. If asked to convert an object into a printable string, Python uses this method, if it's present. For example,

c = Card(1, 's')
print(c)

will print "Ace of Spades."

Test your Card class with a program that prints out n randomly generated cards and the associated Blackjack value where n is a number supplied by the user.

The program may run as follows:


How many cards do you want to test -- 20
Jack of Diamonds.               10
7 of Diamonds.                   7
4 of Clubs.                      4
King of Hearts.                 10
9 of Clubs.                      9
3 of Spades.                     3
Ace of Spades.                   1
7 of Spades.                     7
Queen of Clubs.                 10
King of Diamonds.               10
6 of Diamonds.                   6
3 of Spades.                     3
2 of Spades.                     2
4 of Diamonds.                   4
7 of Diamonds.                   7
2 of Diamonds.                   2
6 of Hearts.                     6
5 of Clubs.                      5
King of Clubs.                  10
Ace of Clubs.                    1