[Tutor] Newbie question re. Functions
Jon Moore
jonathan.r.moore at gmail.com
Tue Jan 31 16:02:46 CET 2006
I know. Its hard enough for someone like me as it is without things like
this complicating it!
I have another one for the group, but I will save it for another day ;)
I have been looking for contact details for the author to ask him what he
was eluding to with the exercise, but to no avail.
Jon
On 31/01/06, Bob Gailer <bgailer at alum.rpi.edu> wrote:
>
> Jon Moore wrote:
> > Hi,
> >
> > I am still working my way through my 'Python for absolute beginners
> > book' and have hit a brick wall with one of the end of chapter
> exercises.
> >
> > The challenge says:
> >
> > Improve the function ask_number() so that the function can be called
> > with a step value. Make the default value of step 1.
> >
> > The function looks like this:
> >
> > def ask_number(question, low, high):
> > """Ask for a number within the range"""
> > response = None
> > while response not in range(low, high):
> > response = int(raw_input(question))
> > return response
> >
> > The author has not eluded to 'step values' in anyway that I can see in
> > the proceeding chapters!
> This lights my frustration fire. I wonder whether the author tested the
> book?
>
> When I worked for a training company I was asked to test a new on-line
> course on JCL. I demurred by saying "But I don't know JCL.". The reply
> was "that's exactly what we want!"
>
> So a general recommendation to authors is to have a member of the target
> audience "test" the book. You Jon have done that but at some cost to you
> and those of us on this list.
>
--
Best Regards
Jon Moore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060131/834b2216/attachment.htm
More information about the Tutor
mailing list