Sum of digit means that we add the digit of the number like
a=1225
then it sum of digit is 1+2+2+5 which is 10
program -
print("Enter any number")
n=int(input())
ans=0
while(n):
t=n%10
ans=ans+t
n=int(n/10)
print("Sum of digit is- ",end=" ")
print(ans)
Enter any number
1224
Sum of digit is- 9