Program 7: Find Mean of List Elements
हिंदी में: Mean का अर्थ अंकगणितीय औसत (Arithmetic Average) है। इसे सभी elements के योग को elements की कुल संख्या से भाग देकर निकाला जाता है।
English: The mean is calculated by dividing the sum of all elements by the total number of elements.
Formula:
Mean=Sum of Elements/Number of Elements
Code:
numbers = [10, 20, 30, 40, 50]
total = sum(numbers)
count = len(numbers)
mean = total / count
print("Sum:", total)
print("Number of Elements:", count)
print("Mean:", mean)
Output:
Sum: 150
Number of Elements: 5
Mean: 30.0