I am still working on that one question in the absolute beginners with the the 
ask_number function and step value. Honestly, I still have no idea what to do. 
This is one of my many attempts, but I know that it's wrong.

def ask_number(question, low, high):
    """Ask for a number within a range."""
    response = None
    if response in range(low, high, 1):
      return response
    while response not in range(low, high):
        response = int(input(question))
    return response

I tried to find clues by looking at the later section that calls on the 
ask_number function:

def human_move(board, human):
    """Get human move."""  
    legal = legal_moves(board)
    move = None
    while move not in legal:
        move = ask_number("Where will you move? (0 - 8):", 0, NUM_SQUARES)
        if move not in legal:
            print("\nThat square is already occupied, foolish human.  Choose 
another.\n")
    print("Fine...")
    return move
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to