Re: [Tutor] blackJack problem

2012-10-24 Thread Alan Gauld
On 24/10/12 04:33, Mark Lawrence wrote: On 24/10/2012 04:01, Matthew D wrote: big top post snipped. Any chance of your prof teaching you *NOT* to top post and to use plain English while you're at it? I didn't think the top posting was a problem here. The bigger issue was that he kept the mai

Re: [Tutor] blackJack problem

2012-10-23 Thread Mark Lawrence
On 24/10/2012 04:36, Matthew D wrote: > To: tutor@python.org From: breamore...@yahoo.co.uk Date: Wed, 24 Oct 2012 04:33:14 +0100 Subject: Re: [Tutor] blackJack problem On 24/10/2012 04:01, Matthew D wrote: big top post snipped. wow was this really necessary? no need to be an

Re: [Tutor] blackJack problem

2012-10-23 Thread Matthew D
> To: tutor@python.org > From: breamore...@yahoo.co.uk > Date: Wed, 24 Oct 2012 04:33:14 +0100 > Subject: Re: [Tutor] blackJack problem > > On 24/10/2012 04:01, Matthew D wrote: > > > > big top post snipped. > > > > wow was this really necessary? no

Re: [Tutor] blackJack problem

2012-10-23 Thread Mark Lawrence
On 24/10/2012 04:01, Matthew D wrote: big top post snipped. Any chance of your prof teaching you *NOT* to top post and to use plain English while you're at it? -- Cheers. Mark Lawrence. ___ Tutor maillist - Tutor@python.org To unsubscribe

Re: [Tutor] blackJack problem

2012-10-23 Thread wrw
On Oct 23, 2012, at 11:01 PM, Matthew D 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 in

Re: [Tutor] blackJack problem

2012-10-23 Thread Matthew D
o: tutor@python.org > From: alan.ga...@btinternet.com > Date: Wed, 24 Oct 2012 01:23:30 +0100 > Subject: Re: [Tutor] blackJack problem > > On 24/10/12 01:00, Matthew D wrote: > > > > > I thought by having a value outside > > > > of the functions made the value

Re: [Tutor] blackJack problem

2012-10-23 Thread Alan Gauld
On 24/10/12 01:00, Matthew D wrote: > > I thought by having a value outside > > of the functions made the value global. > ok...is there an easier way to write this? the reason i was calling that global value the same as the currentBet is because i need to add that value to 5... You need to

Re: [Tutor] blackJack problem

2012-10-23 Thread Matthew D
> To: tutor@python.org > From: alan.ga...@btinternet.com > Date: Tue, 23 Oct 2012 23:46:23 +0100 > Subject: Re: [Tutor] blackJack problem > > Matthew Dalrymple writes: > > > I thought by having a value outside > > of the functions made the value global.

Re: [Tutor] blackJack problem

2012-10-23 Thread Alan Gauld
Matthew Dalrymple writes: > I thought by having a value outside > of the functions made the value global. Not quite. To change the global value in a function you also need to declare it as global inside the function. Otherwise it will create a new local variable that has no effect on the global

[Tutor] blackJack problem

2012-10-23 Thread Matthew Dalrymple
player1.py > http://pastebin.com/jzv1Hhs1blackjack.py > http://pastebin.com/Vj3sp3Ca ok the problem im having is with the GetBet function...i need it so you start with 1000 it will bet 5 everytime...if i win it adds 5 if i lose it subtracts 5 if we tie nothing changes. I think this i

Re: [Tutor] Blackjack problem

2011-07-02 Thread Walter Prins
Hi David (and Vincent, as I think you may be interested in this as well), On 2 July 2011 03:11, David Merrick wrote: > # Blackjack > # From 1 to 7 players compete against a dealer > I came accross this book ( http://homepage.mac.com/s_lott/books/oodesign/build-python/html/index.html ) on the in