Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

[no subject]

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


woodygar at sky

Jun 5, 2008, 6:43 AM

Post #1 of 1 (74 views)
Permalink
[no subject]

Hi there. So I have a challenge in the Python book I am using (python
programming for the absolute beginner) that tells me to improve an ask_number()
function, so that it can be called with a step value, and I havn't
been able to find out yet what's meant by a step value, but i'll keep
looking of course. I'd just be grateful if someone could illimunate
this for me.
def ask_number(question, low, high): """Ask for a number within a range.""" response = None while response not in range(low, high): response = int(raw_input(question)) return response
Thanks in advance.

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.