I don't want to spoil the fun, so I'll just say that "range" is the key here.<br><br>Quentin<br><br><div class="gmail_quote">On Thu, Jun 5, 2008 at 3:43 PM, garywood <<a href="mailto:woodygar@sky.com">woodygar@sky.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div bgcolor="#ffffff">
<div><font face="Arial" size="2"><pre>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.
</pre><pre><br>def ask_number(question, low, high):<br>    """Ask for a number within a range."""<br>    response = None<br>    while response not in range(low, high):<br>        response = int(raw_input(question))<br>
    return response<br></pre><pre>Thanks in advance.
</pre></font></div></div>
<br>--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>