def count_negatives(seq):
    """
    What comes in:  An sequence of numbers.
    What goes out:  Returns the number of items in the given sequence
      that are negative.
    Side effects:   None.
    Examples:
      count_negatives([8, 13, 7, -5])  returns  1
      count_negatives([])  returns  0
      count_negatives([3, 2.5, 3])  returns  0
      count_negatives([-500, -500, -500, -0.0000001])  returns  4
      count_negatives((8, 13, 7, -5))  returns  1
    Type hints:
      :type seq: (list | tuple) of (int | float)
    """
    # -------------------------------------------------------------------------
    # DONE: 3. Implement and test this function.
    #   Note that you should write its TEST function first (above).
    # -------------------------------------------------------------------------
    total = 0
    for k in range(len(seq)):
        if seq[k] < 0:
            total = total + 1
    return total