# function to find minimum value
def findMin(lis):
return min(lis)
# function to find maximum value
def findMax(lis):
return max(lis)
# function to find mean value
def findMean(lis):
return sum(lis) / len(lis)
# given the list of ages
ages = [40, 56, 46, 58, 79, 70, 67, 46, 32, 91, 92, 93, 47, 95, 69, 56, 50, 30, 9, 29, 29, 0, 31, 21, 14, 18, 16, 18,
76, 68, 6, 9, 78, 81, 71, 91, 1, 69, 78, 77, 54, 59, 59, 41, 51, 48, 49, 76, 10]
print("Minimum age is : ", end="")
print(findMin(ages))
print("Maximum age is : ", end="")
print(findMax(ages))
print("Mean age is : ", end="")
print(findMean(ages))
Comments
Leave a comment