title: Sum of odd and even digits of a number using recursion
body: <p>I have currently set a code that adds the even or odd digits of a number. But when I run it, it does not add all the digits.</p>
  
  <p>I know that modulus (%) and float division (//) should be used, but I cannot go on further. I only want to use recursion and while loop, since I haven't yet learned for loop.</p>
  
  <pre><code>def sum_even_digits(number):
      if number == 0:
          return 0
      remainder = number % 10
      if remainder % 2 == 1:
          return 0
      if remainder % 2 == 0:
          return number % 10 + sum_even_digits(number // 10) 
  
  def sum_odd_digits(number):
      if number == 0:
          return 0
      remainder = number % 10
      if remainder % 2 == 0:
          return 0
      if remainder % 2 == 1:
          return number % 10 + sum_even_digits(number // 10)
  </code></pre>
  
  <p>For instance, I expect the even digit sum of 256 is 8, but it only gives 6.</p>