Re: [Tutor] Coin flip game

2010-02-12 Thread Albert-Jan Roskam
temptation to guess. ~~ --- On Fri, 2/12/10, David wrote: From: David Subject: Re: [Tutor] Coin flip game To: tutor@python.org Date: Friday, February 12, 2010, 1:49 AM Hello Lawrence, let me try to clarify this (warning: am a begi

Re: [Tutor] Coin flip game

2010-02-11 Thread Alan Gauld
"Jones, Lawrence D" wrote My code is below. But can someone please explain to me why the following variable has to be placed where it is Others have explained about variable creation and the fact you need to be inside the loop to get different results for each iteration.

Re: [Tutor] Coin flip game

2010-02-11 Thread David
Hello Lawrence, let me try to clarify this (warning: am a beginner myself). On 12/02/10 06:15, Jones, Lawrence D wrote: Hi, I'm new to the list and to Python. I'm reading through Michael Dawson's 'Python programming: for absolute beginners' and at the end of chapter 3 he's set a challenge wh

Re: [Tutor] Coin flip game

2010-02-11 Thread Benno Lang
On Fri, Feb 12, 2010 at 7:15 AM, Jones, Lawrence D wrote: > My code is below. But can someone please explain to me why the following > variable has to be placed where it is for the code to work? I thought it > would need to go nearer the start of the code i.e. just before heads = 0, > tails = 0 et

[Tutor] Coin flip game

2010-02-11 Thread Jones, Lawrence D
Hi, I'm new to the list and to Python. I'm reading through Michael Dawson's 'Python programming: for absolute beginners' and at the end of chapter 3 he's set a challenge where the reader has to create a coin flip game. My code now works, but only after I randomly switched pieces of the code aro