Blackjack (21 points). This question is adpoted from John Zelle's Book: Python Programming: an intro to comp sci.
Blackjack (twenty-one) is a casino game played with cards. The goal of the game to draw cards that total as close to 21 points as possible without going over. All face cards count as 10 points, aces count as 1 or 11, and all other cards count their numeric value.
The game is played against a dealer. The player tries to get closer to 21 (without going over) than the dealer. If the dealer busts (goes over 21) the player automatically wins (provided the player had not already busted). The dealer must always take cards according to a fixed set of rules. The dealer takes cards until he or she achieves a total of at least 17. If the dealer's hand contains an ace, it will be counted as 11 when that results in a total between 17 and 21 inclusive; otherwise, the ace is counted as 1.
Write a program that simulates multiple games of blackjack and estimates the probability that the dealer will bust. Hints: treat the deck of cards as infinite. You do not need to keep track of the cards in the hand, just the total so far (treating an ace as 1) and a bool variable hasace that tells whether or not the hand contains an ace. A hand containing an ace should have 10 points added to the total exactly when doing so would produce a stopping total(something between 17 and 21 inclusive).
- write a function that picks/generates the next card.
- write a function to tell if the dealer is busted or not.
- write a function to simulate the game for n times, where n is specified by user.
- compilable and meaningful attemps: 30%
- functionality: 60%
- comment, indentation and file name: 10%
[login to view URL]
hi, i'm interested in your project. i've experience in python and i can do this cards thing for you with quality code. pm if interested. Regards
7 freelanceri licitează în medie 39$ pentru acest proiect
Hi, I'm an expert in python programming. I'm sure that I can easily do this project for you. We can have a chat about it. Thanks.
Hey there, I can do this task within a day so feel free to inbox me any time. Thank you..............
Quality Service can be fullfil If you provide a chance to proof. Relevant Skills and Experience Object Oriented concept is very much clear to me for any developing purpose work.
Hello, my name is Ever Atilano. I am starting as a Freelancer, however, I worked as firmware engineer before so I have some expertise in this area. I've work with c++for a couple of years, so I can help you to develop Mai multe
Hi, I can implement required function for blackjack gaem. Leave a response to discuss further. Regards, A. Abbas
hello i am a python developer and i know this game. i have done the coding of this game in java but for you i will do this project in python.