def min_index(sequence):
    """
    Returns the index of the smallest item in the given sequence.

    Precondition: the sequence is a non-empty sequence of numbers.
    """
    # ------------------------------------------------------------------
    # Return the INDEX of the smallest item in the sequence.
    # ------------------------------------------------------------------
    index_of_min = 0
    for k in range(1, len(sequence)):
        if sequence[k] < sequence[index_of_min]:
            index_of_min = k

    return index_of_min