Problem 75

Baby Blackjack

Write a program that allows a human user to play a single hand of “blackjack” against a dealer.

  1. Pick two values from 1-10 for the player. These are the player’s “cards”.
  2. Pick two more values from 1-10 for the dealer.
  3. Whoever has the highest total is the winner.
  4. There is no betting, no busting, and no hitting. Save that for real blackjack.
Baby Blackjack!

You drew 6 and 5.
Your total is 11.

The dealer has 7 and 3.
Dealer's total is 10.

YOU WIN!

◄ 74: Adding Values with a For Loop 76: Project: Blackjack ►



Adapted from ProgrammingByDoing.com
©2013 Graham Mitchell

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.