Computer Science, asked by aimone6846, 10 months ago

Python program to calculate the average of numbers in a given list

Answers

Answered by rajuramuchacha
0

Answer:

num = int(input('How many numbers: '))

total_sum = 0

for n in range(num):

numbers = float(input('Enter number : '))

total_sum += numbers

avg = total_sum/num

print('Average of ', num, ' numbers is :', avg)

Explanation:

num = int(input('How many numbers: '))

total_sum = 0

for n in range(num):

numbers = float(input('Enter number : '))

total_sum += numbers

avg = total_sum/num

print('Average of ', num, ' numbers is :', avg)

Similar questions