Today we are going to share a **Python program to calculate the average of numbers in a given list**. If you are a python beginner and want to start learning the **python programming**, then keep your close attention in this tutorial as I am going to share a **Python program to calculate the average of numbers in a given list**.

1 2 3 4 5 6 7 | n=int(input("Enter the number of elements to calculate average: ")) a=[] for i in range(0,n): elem=int(input("Enter element: ")) a.append(elem) avg=sum(a)/n print("Average of elements in the list",round(avg,2)) |

Enter the number of elements to calculate average: 5

Enter element: 5

Enter element: 10

Enter element: 15

Enter element: 20

Enter element: 25

Average of elements in the list 15

To increase your Python knowledge, practice all Python programs, here is a **collection of 100+ Python problems with solutions.**

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

- Important python programs for CBSE Class 11
- Python File Methods
- Python program to add digits of a number
- Python program for subset sum problem
- Generating strong password using Python
- Download Google Images using Python Script
- Python examples on simple mathematical problems
- Program for adding two binary numbers
- Python Program to Solve n-Queen Problem with Recursion
- Python Program to Solve the Celebrity Problem

We use cookies to ensure that we give you the best experience on our website. We and our partners are using technologies like cookies in order to personalize the advertising that you see. This helps us to show you more relevant ads and improves your internet experience. Read more about our Privacy Policy.Got it!