Here is my code, its supposed to tell me the count number of the decimal digits in a positive and negative integers.
def num_digits(n):
count = 0
for i in range(0, len(str(n))):
count += n % 10
n = n // 10
return count
num_digits(2)
print()
print()
num_digits(12)
print()
print()
num_digits(123)
When I run the program I get nothing
Can you please show me the full code written correctly