Have this print statement which correctly calculates the value of 'Count' and that is what I am returning, but eventually I am getting 'None' as a result. Please point out the correction that have to make the function provide the correct value of count...
def additive_persistence(num, count):
sumer = 0
num_copy = num
while num_copy:
sumer = sumer + (num_copy % 10)
num_copy = num_copy // 10
count += 1
print(sumer, count) # just to check the calculation is right!
if sumer > 9:
num = sumer
additive_persistence(num, count)
else:
return (count)
counter = 0
number = int(input("Enter Number: "))
add_pers = additive_persistence(number, counter)
print("Additive Persistence of number {}, is: {}".format(number, add_pers))