Python Reading
queen of hearts, ace of spades evaluates to 21
ace of spades, jack of clubs evaluates to 21
ten of spades, ace of spades evaluates to 21
two of spades, three of clubs, four of diamonds, five of hearts, six of spades, seven of clubs evaluates to 27
eight of diamonds, nine of hearts, two of spades evaluates to 19
- Read the chapter entitled Classes and Objects - the Basics from section "Improving Our Constructor" through section "Adding Other Methods to Our Class"
- Lecture recording
- Today's reading provides additional examples and explanations of concepts.
- In the game of BlackJack, an ace is worth 11 points, a king is worth 10 points, a queen is worth 10 points, a jack is worth 10 points, and all other cards are worth face value.
- Download card.py and blackjack.py onto your local machine. Complete method assign_value and function process_hand such that the following output is produced when the program is run.
queen of hearts, ace of spades evaluates to 21
ace of spades, jack of clubs evaluates to 21
ten of spades, ace of spades evaluates to 21
two of spades, three of clubs, four of diamonds, five of hearts, six of spades, seven of clubs evaluates to 27
eight of diamonds, nine of hearts, two of spades evaluates to 19