Python program to calculate Mean using List

Write a python program to calculate Mean using List. def findMean(mList): print(sum(mList)/len(mList)) dataList = [60, 120, 130, 140, 150, 70, 80, 90, 100, 110,111,112] findMean(dataList)   Output: 106.08333333333333

Python Program To Find Digits Sum Of An Integer

Method-01 def sumOfDigits(N): sum=0 while(N>0): D=int(N%10) sum=sum+D N=int(N/10) return sum n =int(input("Enter the number: ")) print("Sum Of Digits: ",sumOfDigits(n)) Output: Enter the number: 89 Sum Of Digits: 17