In the above example in-built min function is used to calculate the minimum value of the tuple. Write a function to calculate the minimum of tuple and also average of the tuple.
1
Expert's answer
2011-08-04T12:32:30-0400
def my_min_and_avg (tuple): min = tuple[0] sum = 0 for s in tuple: & min = (min < s) and min or s & sum += s return min, sum/len(tuple)
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment