On Wed, 06 Aug 2014 21:59:12 -0700, Larry Hudson
wrote:
>On 08/06/2014 08:48 PM, Seymore4Head wrote:
>> On Thu, 07 Aug 2014 13:43:40 +1000, Steven D'Aprano
>> wrote:
>>
>>> Seymore4Head wrote:
>>>
On Wed, 06 Aug 2014 22:58:51 -0400, Seymore4Head
wrote:
>
>[snip]
>>> Ah, now thing
Larry Hudson writes:
> I just took a look at that web page, and I see what your problem
> actually is...
> You are misunderstanding the problem. The problem does NOT say to end
> the loop at three tries, just to keep track of the number of tries.
> It's not actually specific, but the implication
On 08/06/2014 08:48 PM, Seymore4Head wrote:
On Thu, 07 Aug 2014 13:43:40 +1000, Steven D'Aprano
wrote:
Seymore4Head wrote:
On Wed, 06 Aug 2014 22:58:51 -0400, Seymore4Head
wrote:
[snip]
Ah, now things make sense! Your subject line is misleading! It's not that
the wikibooks example doesn
On 7/08/2014 1:25 PM, Seymore4Head wrote:
This part was added as an exercise.
A counter is added to give 3 tries to guess the number.
It is supposed to stop after count gets to 3. It doesn't. It just
keeps looping back and asking for another guess.
You've misread the exercise:
Modify the hig
On Thu, 07 Aug 2014 13:43:40 +1000, Steven D'Aprano
wrote:
>Seymore4Head wrote:
>
>> On Wed, 06 Aug 2014 22:58:51 -0400, Seymore4Head
>> wrote:
>>
>>>number = 7
>>>guess = -1
>>>count = 0
>>>
>>>print("Guess the number!")
>>>while guess != number:
>>>guess = int(input("Is it... "))
>>>
Seymore4Head wrote:
> On Wed, 06 Aug 2014 22:58:51 -0400, Seymore4Head
> wrote:
>
>>number = 7
>>guess = -1
>>count = 0
>>
>>print("Guess the number!")
>>while guess != number:
>>guess = int(input("Is it... "))
>>count = count + 1
>>if guess == number:
>>print("Hooray! You g
Seymore4Head wrote:
[snip code that looks fine to me]
> Why not?
I don't know. What does "doesn't work" mean?
"It didn't do what I expected." (What did you expect? What did it do?)
"It printed an error message." (Care to tell it what it was?)
"It crashed the computer." (Some more details migh
On Wed, 06 Aug 2014 22:58:51 -0400, Seymore4Head
wrote:
>number = 7
>guess = -1
>count = 0
>
>print("Guess the number!")
>while guess != number:
>guess = int(input("Is it... "))
>count = count + 1
>if guess == number:
>print("Hooray! You guessed it right!")
>elif guess <
In Seymore4Head
writes:
> number = 7
> guess = -1
> count = 0
>
> print("Guess the number!")
> while guess != number:
> guess = int(input("Is it... "))
> count = count + 1
> if guess == number:
> print("Hooray! You guessed it right!")
> elif guess < number:
> p
On Thu, Aug 7, 2014 at 12:58 PM, Seymore4Head
wrote:
> Why not?
> I think I know why it isn't working, but I don't know enough yet on
> how it should work.
> The If statement isn't getting read.
One thing you need to learn about Python... or, for that matter,
pretty much any language. "It isn't w
10 matches
Mail list logo