Re: [Tutor] Newbie question re. Functions

2006-02-01 Thread Ed Singleton
On 31/01/06, Jon Moore [EMAIL PROTECTED] wrote: 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 =

Re: [Tutor] Newbie question re. Functions

2006-02-01 Thread Jon Moore
Thats fine, but what differance does it make?I can see no way that it improves the code.I assume later on when the function is called, it should look as follows:move = ask_number(Where will you move? (0-8): , 0, NUM_SQUARES, 1) JonOn 01/02/06, Ed Singleton [EMAIL PROTECTED] wrote: On 31/01/06, Jon

[Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
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

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Kent Johnson
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

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Alan Gauld
Hi Jon, Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1. If its any consolation that doesn't really mean much to me either. I understand the concept of step value - range() takes one for example, check the docs. But

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
I guess I am not going mad then!I will skip this exercise and move on.ThanksJonOn 31/01/06, Alan Gauld [EMAIL PROTECTED] wrote:Hi Jon, Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1.If its any consolation that doesn't

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Bob Gailer
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

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
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. JonOn

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Danny Yoo
On Tue, 31 Jan 2006, Jon Moore wrote: 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. Hi Jon, I did find errata here: http://www.muskalipman.com/ptr_detail.cfm?group=Programmingall=1isbn=1-59200-073-8 (bottom of

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Alan Gauld
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. One advantage of doing my book as a web site first was that I had plenty of testers before committing to print (over

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
DannyMany thanks for that, I notice a few erratas that I am yet to come up against. This will save my sanity (well some of it)1JonOn 31/01/06, Danny Yoo [EMAIL PROTECTED] wrote: On Tue, 31 Jan 2006, Jon Moore wrote: I have been looking for contact details for the author to ask him what he was

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
AlanAre you the author of Learn to Program Using Python: A Tutorial for Hobbyists, Self-starters and All Who Want to Learn the Art of Computer Programming? Is the book still available as a web site?JonOn 31/01/06, Alan Gauld [EMAIL PROTECTED] wrote: So a general recommendation to authors is to

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Alan Gauld
Are you the author of Learn to Program Using Python: A Tutorial for Hobbyists, Self-starters and All Who Want to Learn the Art of Computer Programming? Yes. Is the book still available as a web site? Yes. It has been substantially rewritten sionce the book was done to cover more recent