Python program to find average of N numbers

Written by

Himani Kohli

Python Average program

In this python program we will learn to calculate the average of number for N numbers.

Average is the sum of items divided by the number of items.

Here, we’ll calculate the sum and average of a natural number as listed by the user.


  1. Input the numbers from the user.
  2. Initialize sum =0.
  3. Using for loop, calculate sum and average of the numbers.
  4. Print average of the list.
  5. Exit  


n=int(input("Enter the total number you want to enter:"))


for i in range(n):

    x=int(input("Enter the number:"))





Enter the total number you want to enter:4

Enter the number:2

Enter the number:4

Enter the number:6

Enter the number:8

Average= 5.0