I need help with this challenge I have in a book I'm reading. I can't really understand the questions.
Improve the function ask_number()so that the function can be
called with a step value. Make the default value of step 1.
Here's the function
Improve the function ask_number()so that the function can be
called with a step value. Make the default value of step 1.
Here's the function
Code:
def ask_number(question, low, high):
"""Ask for a number within a range."""
response = None
while response not in range(low, high):
response = int(input(question))
return response
Comment