In this we are going to see how to build a function to to Find the Average of All Numbers in List - Type 3 of Functions in Python Programming Language.
def avg():
list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
sum = 0
for i in list:
sum = sum + i
avg = sum / len(list)
return avg
print(avg())
# Coded by Saahil Shaikh
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP