Answer to Question #141465 in Python for Dharmarajan

Question #141465
A survey gathers heights and weight of 50 participants and recorded the participants age as 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,01,69,78,77,54,59,59,41,51,48,49,76,10]
1
Expert's answer
2020-11-02T11:19:18-0500
# 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))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS