I got wrong output when I run the programme.I use python 3.4.3 version.Below is my program code,
CODE:-
from pip._vendor.distlib.compat import raw_input
def sumOfDigits(n):
summ=0;
while(n!=0):
r = n%10;
summ+=r;
n/=10;
return summ;
input_num = raw_input("Enter a number : ");
n = int(input_num);
print("sum of digits of the number %s is %d" % (input_num,sumOfDigits(n)));
OUTPUT:-
Enter a number : 54928
sum of digits of the number 54928 is 31