Write a program that finds the average of all of the entries in a 4 × 4 list of integers.
def avg(n):
sum=0
for i in n:
for j in i:
sum=sum+j
return sum/16
print (avg([[2,3,4,5],[34,5,6,8],[2,4,7,4],[2,5,8,5]]))
Write a program that finds the average of all of the entries in a 4 × 4 list of integers.
def avg(n):
sum=0
for i in n:
for j in i:
sum=sum+j
return sum/16
print (avg([[2,3,4,5],[34,5,6,8],[2,4,7,4],[2,5,8,5]]))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us