Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left
Apply NowLogin using Social Account
     Continue with GoogleLogin using your credentials
Now we will define another function which will ask for a number. This number corresponds to the board position as mentioned in the display_instructions
function earlier.
Define the function ask_number
as shown below. It will take 3 arguments; question
, low
, and high
respectively.
def <<your code goes here>>(<<your code goes here>>, <<your code goes here>>, <<your code goes here>>):
response = None
while response not in range(low, high):
response = int(input(question))
return response
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
No hints are availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...