def two_places_at_once(sequence):
    """
    Demonstrates iterating (looping) through a sequence,
    but examining TWO places in the sequence on the SAME ITERATION.

    This particular example returns the number of items in the sequence
    that are bigger than the previous item in the sequence.
    For example, if the sequence is [4, 66, 33, 90, 93, 3, 3, 3, 2, 15],
    then the function returns   4
    since   66 > 4   and   90 > 33   and   93 > 90   and   15 > 2.
    """
    # ------------------------------------------------------------------
    # The   TWO-PLACES-AT-ONCE   pattern is:
    #
    #    for k in range( BLAH ):
    #        ... sequence[ FOO_1 ] ... sequence[ FOO_2 ] ...
    #
    # where BLAH is some range appropriate to the problem,
    #       FOO_1 is some function of k that gives ONE
    #             of the "two places at once" to examine, and
    #       FOO_2 is another function of k that gives the OTHER
    #             of the "two places at once" to examine.
    # Typically, FOO_1 or FOO_2 (but not both) is simply k.
    # ------------------------------------------------------------------
    count = 0
    for k in range(len(sequence) - 1):
        if sequence[k + 1] > sequence[k]:
            count = count + 1

    return count