If I want to find the sum of the digits of a number, i.e.:
932
14
(9 + 3 + 2)
def sumOfDigits(): n=int(input("enter digit:")) sum=0 while n!=0 : m=n%10 n=n/10 sum=int(sum+m) print(sum) sumOfDigits()