Computer Science, asked by saileinthirababu, 5 months ago

Given a nested list tuple1=((1,2),3,4.15,5.15),(7,8,12,15)). Write a

program that displays the means of individual elements of tuple tup1

and then display the mean of these computed means.

Output should be like the one given below.

Mean element1:1.5 Mean element3:10.5

Mean element2: 4.1 Mean of means:5.3666​

Answers

Answered by virat7929
0

Answer:

sorry brother but I need points

Answered by dreamrob
3

Program :

tuple1 = ((1 , 2) , (3 , 4.15 , 5.15) , ( 7 , 8 , 12 , 15))

count = 0

for i in range (len(tuple1)):

   print("Mean element" , i + 1 , ":" , sum(tuple1[i]) / len(tuple1[i]))

   count += sum(tuple1[i]) / len(tuple1[i])

print("Mean of means " , count / len(tuple1))

Output :

Mean element 1 : 1.5

Mean element 2 : 4.1000000000000005

Mean element 3 : 10.5

Mean of means  5.366666666666667

Attachments:
Similar questions