Python: Recursive: Sum Integer

Write the recursive function sum_integer that takes an integer n and repeatedly calculates the sum of the input digits until the result is less than 10.


sum_integer(105377312) -> 2
sum_integer(99999) -> 9

Test 1    

Test 2    

Test 3    

Test 4    

Test 5    

Test 6    

Test 7    

Test 8