66. Problem to calculate the average of the list.

In this Python list program, we will take a user input as a list and calculate the average of the list with the help of the below-given steps.

Average of the list elements:

Steps to solve the program
  1. Take a list as input.
  2. Create a variable called total.
  3. Add each element of the list in the total variable using for loop.
  4. To find the average divide the total by length of the list.
  5. Print the output to see the result.

output :

Related Articles

Difference between consecutive numbers in list

Count integers in a given mixed list

Leave a Comment