input: Write a function to calculate the sum of the digits in a given number. If the given number is negative then return the sum of the digits multiplied by -1. If the given number is empty then return 0.
  def sum_digits(num):
      if num == "":
          return 0
      num = int(num)
      total = 0
      negative = 1
      if num < 0:
          num = -num
          negative = -1
      while num > 0:
          digit = num % 10
          total += digit
          num = num // 10
      return total * negative
      
  assert sum_digits(123)==6
  assert sum_digits(-456)==-15
  assert sum_digits("")==0
  assert sum_digits(0)==0
  assert sum_digits(11111)==5
output: def sum_digits(num):
      if num == "":
          return 0
      num = int(num)
      total = 0
      negative = 1
      if num < 0:
          num = -num
          negative = -1
      while num > 0:
          digit = num % 10
          total += digit
          num = num // 10
      return total * negative