[Tutor] blackJack problem

wrw at mac.com wrw at mac.com
Wed Oct 24 05:18:38 CEST 2012

On Oct 23, 2012, at 11:01 PM, Matthew D <computer_dude15 at hotmail.com> wrote:

> Thanks Alan Gauld for your help. After taking a little break and coming back it all seemed to make sense...i understand why there is gonna be some really weird outputs to the interchanging of the player1.py files...that really could get interesting LOL...I seemed to have got the program running good
> now i have only a few pretty simple questions, If you have the GetBet in the player1.py file you have to pass in the total value right?...that is the only way to get the total into the function? the professor told us straight out that he doesnt really know what he is doing...he wanted us to put in (currentBet, previousBet, and win/lose). I think it only makes sense if you put in the total value in as prevousBet. also he wanted us to pass in (player_hand, dealer_hand) in as parameters for the HitStand function...why would we want to total the hand more than once if we already have the total value? wouldn't we want to just pass in those values instead of the hand itself?
> Im starting to think im not really learning anything from this class...if anything its just confusing me and teaching me the wrong way to go about things
> thanks again for your help :)

The best way to learn to program is to program.  Doing it in the context of a class has several advantages (even if the prof isn't the sharpest tack in the box)…

1)  The class discussion of various approaches to the assignment gives you a range of possible solutions, both good and bad

2)  The enforced discipline of generating a solution to the assignment makes you think

3)  Learning (almost) any programming language forces you to learn how to reduce a problem to discrete tasks and then steps.  Once you've learned ANY language, the next one is easier.  That process iterates.

4)  Python is an ideal language and environment in which to learn.  That is, it's a really good starting place.

Just saying…

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121023/03037bfa/attachment.html>

More information about the Tutor mailing list