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!
HELP!
--
Best Regards
Jon Moore
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor