Re: [Tutor] Help with "Guess the number" script

2014-03-01 Thread Ben Finney
Ben Finney writes: > So, you have one name ‘guess_number’ bound to the function's parameter. > Don't bind anything else to it! By which I mean, don't bind that name to anything else in the function (don't re-assign any other value to that name in the function). Keep that name's meaning by leavin

Re: [Tutor] Help with "Guess the number" script

2014-03-01 Thread Ben Finney
Scott W Dunning writes: > On Mar 1, 2014, at 12:47 AM, Ben Finney wrote: > > > You've bound the name ‘current_guess’ to the user's input, but then do > > nothing with it for the rest of the function; it will be discarded > > without being used. > Hmm, I’m not quite sure I understand. I got som

Re: [Tutor] Help with "Guess the number" script

2014-03-01 Thread Scott W Dunning
On Mar 1, 2014, at 6:53 AM, spir wrote: > > I find directions very confusing. Also, they completely control you while > explaining about nothing, like a user manual saying "press this, turn that". > This is inappropriate for programming (and anything else): you need to > understand! You need

Re: [Tutor] Help with "Guess the Number" script

2014-03-01 Thread Scott W Dunning
On Mar 1, 2014, at 8:57 AM, Mark Lawrence wrote: > On 01/03/2014 06:05, Scott Dunning wrote: > > In addition to the answers you've already had, I suggest that you learn to > run code at the interactive prompt, it's a great way of seeing precisely what > snippets of code actually do. Also use

Re: [Tutor] Help with "Guess the number" script

2014-03-01 Thread Scott W Dunning
On Mar 1, 2014, at 12:47 AM, Ben Finney wrote: > You've bound the name ‘current_guess’ to the user's input, but then do > nothing with it for the rest of the function; it will be discarded > without being used. Hmm, I’m not quite sure I understand. I got somewhat confused because the direction

Re: [Tutor] Help with "Guess the number" script

2014-03-01 Thread Alan Gauld
On 01/03/14 17:16, Alan Gauld wrote: Scott W Dunning writes: def get_guess(guess_number): print "(",guess_number,")""Plese enter a guess:" Aren't you missing a comma before the last string? I just realized it will work because Python auto joins adjacent string literals. But in this c

Re: [Tutor] Help with "Guess the number" script

2014-03-01 Thread Alan Gauld
Scott W Dunning writes: def get_guess(guess_number): print "(",guess_number,")""Plese enter a guess:" Aren't you missing a comma before the last string? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos

Re: [Tutor] When to use multiprocessing Managers?

2014-03-01 Thread eryksun
On Fri, Feb 28, 2014 at 6:31 AM, James Chapman wrote: > > log_Q = multiprocessing.Queue() This is a Queue from multiprocessing.queues. It uses system resources (e.g. a semaphore for the queue capacity) that can be shared with processes on the same machine. A value `put` in a queue.Queue is avail

Re: [Tutor] Help with "Guess the Number" script

2014-03-01 Thread Mark Lawrence
On 01/03/2014 06:05, Scott Dunning wrote: In addition to the answers you've already had, I suggest that you learn to run code at the interactive prompt, it's a great way of seeing precisely what snippets of code actually do. Also use the print statement in Python 2 or print function in Python

Re: [Tutor] Help with "Guess the number" script

2014-03-01 Thread spir
On 03/01/2014 07:46 AM, Scott W Dunning wrote: Hello, i am working on a project for learning python and I’m stuck. The directions are confusing me. Please keep in mind I’m very ne to this. The directions are long so I’ll just add the paragraphs I’m confused about and my code if someone coul

Re: [Tutor] Help with "Guess the number" script

2014-03-01 Thread Dave Angel
Scott W Dunning Wrote in message: In addition to Ben's observation, you don't use anything random when initializing secret. And you don't store the result of get_guess. -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscribe or change s