Sunday, March 3, 2019

Find Average using list - Python3

list1 = []
len_list = int(input("Enter the number of items to enter into the list: "))
for i in range(len_list):
    new = int(input("Enter the value: "))
    list1.append(new)

print("Average = "+str(sum(list1)/len(list1)))

ScreenShot:

No comments:

Post a Comment