You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write a function named sumDigits which takes a number as input and returns the sum of the absolute value of each of the number's decimal digits. For example:
sum_digits(10) # Returns 1
sum_digits(99) # Returns 18
sum_digits(-32) # Returns 5
Let's assume that all numbers in the input will be integer values.