# The mean of a set of numbers is the sum of the numbers divided by the
# number of numbers. Write a procedure, list_mean, which takes a list of numbers
# as its input and return the mean of the numbers in the list.

# Hint: You will need to work out how to make your division into decimal
# division instead of integer division. You get decimal division if any of
# the numbers involved are decimals.

def list_mean():
    i = 0
    sum_int = 0.0
    while i < len(p): # or <=?
        sum_int = p[i] + sum_int
        i = i + 1
    return sum_int / len(p)

print list_mean([1,2,3,4])
#>>> 2.5
print list_mean([1,3,4,5,2])
#>>> 3.0
print list_mean([2])
#>>> 2.0

Create findmean.py