Average of the given numbers
n = int(input("The number of digits for which you want to calculate the average: "))
num_list = []
print("Enter the number: ")
for x in range(n):
k = int(input())
num_list.append(k)
avg = sum(num_list) / len(num_list)
print("Average: ", avg)
Comments
Leave a comment