[Tutor] I need help to the Python blackjack code

Wayne srilyk at gmail.com
Mon Jul 20 15:24:25 CEST 2009


2009/7/20 GAONEO <gys1101 at hotmail.com>

>  Hi
>
>     This is the first code that I have programed. I think there is
> something wrong with it. It is not a loop and computer seems wont bust. In
> the game,
>
> ace will be fixed as low (value=1). And can you write documentation
> comments for the first 39lines.
>
>

 your score is 87
you bust
you lose and computer wins
twist (t) or stick (s)?s
you choose stick
It is computers turn
computer stick
computer score is 63
you win and computer loses
twist (t) or stick (s)?

Evidently you don't stop on either your bust or the computer bust. Maybe you
should try writing out in more or less plain language how a game of
blackjack works.

What happens first? What happens next? In the casino if the deal has a hard
OR soft 17, it always stands (or sticks in your program). See if you can
make the computer stop once it reaches 17. Also see if you can make the
program stop once the user makes it to 21.

HTH,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090720/71d1e789/attachment.htm>


More information about the Tutor mailing list