def num_ans(prompt):
    """
    Handles numerical input.
    """
    while True:
        response = input(prompt + "\n")
        try:
            return int(response)
        except ValueError:
            print("Please enter a numeric value.")