average value of list elements in python
# Example to find average of list number_list = [45, 34, 10, 36, 12, 6, 80] avg = sum(number_list)/len(number_list) print("The average is ", round(avg,2))
average value of list elements in python
# Example to find average of list number_list = [45, 34, 10, 36, 12, 6, 80] avg = sum(number_list)/len(number_list) print("The average is ", round(avg,2))
python find average of list
# A function that finds an average of a list of numbers numbers = [1,2,3,4,5,6,7,889,102390143] def find_average(number_list): total = 0 for number in number_list: total += number average = total / len(number_list) print("Your average is:", average) find_average(numbers)
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