Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Blackjack Probabilities - Data Structures I - Assignment Six | COMP 385, Assignments of Data Structures and Algorithms

Material Type: Assignment; Class: DATA STRUCTURES II; Subject: Computer Science; University: Wentworth Institute of Technology; Term: Fall 2007;

Typology: Assignments

Pre 2010

Uploaded on 08/16/2009

koofers-user-mvw
koofers-user-mvw 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Wentworth Institute of Technology
Division of Professional and Continuing Studies
COMP385 Section 71 - Data Structures II - Fall, 2007
Homework 6 – Blackjack Probabilities
Instructor: Bob Goldstein (617) 912-2512
bobg@vision.eri.harvard.edu
robert.goldstein@schepens.harvard.edu
http://home.comcast.net/~goldsteinr/Courses/index.html
http://goldstein.eri.harvard.edu/courses/index.html
http://myweb.wit.edu/goldsteinr/Courses/index.html
Due Date: October 23, 2007
Hand In: Printout of program code and dialogue of how it runs.
Purpose:
Build a simulation by working with stacks.
Description:
Use the classes “PlayingCard” and “CardDeck” to build 1 million blackjack hands to calculate the probability of
getting a “natural 21”. According to www.blackjacktactics.com The mathematically calculated probability is
4.8%
For each blackjack hand, start with a freshly shuffled deck. Then pop the top 2 cards off the deck to get one
blackjack hand. .
A “natural 21” is an ace together with a 10 or any face card (Jack, Queen, King).
In 1 million deals, you should get about 48,000 natural 21s.
Extra Credit:
1. Determine the probability of getting a 17-20. According to www.blackjacktactics.com this probability is
30%. In this case an ace would be counted as an “11”.
Extra, Extra Credit
2. Simulate a simple blackjack game where the user plays against the computer, and there is no third card.
The two players only get 2 cards each.
/app/work/qkd8n3-356696-2765071-homework6-doc.doc 1 12/6/2020 12/6/2020

Partial preview of the text

Download Blackjack Probabilities - Data Structures I - Assignment Six | COMP 385 and more Assignments Data Structures and Algorithms in PDF only on Docsity!

Wentworth Institute of Technology

Division of Professional and Continuing Studies

COMP385 Section 71 - Data Structures II - Fall, 2007

Homework 6 – Blackjack Probabilities

Instructor: Bob Goldstein (617) 912- bobg@vision.eri.harvard.edu robert.goldstein@schepens.harvard.edu http://home.comcast.net/~goldsteinr/Courses/index.html http://goldstein.eri.harvard.edu/courses/index.html http://myweb.wit.edu/goldsteinr/Courses/index.html Due Date: October 23, 2007 Hand In: Printout of program code and dialogue of how it runs. Purpose: Build a simulation by working with stacks. Description: Use the classes “PlayingCard” and “CardDeck” to build 1 million blackjack hands to calculate the probability of getting a “natural 21”. According to www.blackjacktactics.com The mathematically calculated probability is 4.8% For each blackjack hand, start with a freshly shuffled deck. Then pop the top 2 cards off the deck to get one blackjack hand.. A “natural 21” is an ace together with a 10 or any face card (Jack, Queen, King). In 1 million deals, you should get about 48,000 natural 21s. Extra Credit:

  1. Determine the probability of getting a 17-20. According to www.blackjacktactics.com this probability is 30%. In this case an ace would be counted as an “11”. Extra, Extra Credit
  2. Simulate a simple blackjack game where the user plays against the computer, and there is no third card. The two players only get 2 cards each. /app/work/qkd8n3-356696-2765071-homework6-doc.doc 1 12/6/2020 12/6/