def mean(xs):
    """A function mean(xs) that takes a sequence xs of numbers, and returns the (arithmetic) mean
    (i.e. the average value)."""
    count = 0
    for i in xs:
        count += i
    return count / len(xs)