input: def SumOfDigits(num: int) -> int:
      """
      Given a number, calculate the sum of its digits.
      
      >>> SumOfDigits(6342)
      15
      >>> SumOfDigits(1234)
      10
      >>> SumOfDigits(0)
      0
      """
      total = 0
      for ch in str(num):
          total += int(ch)
      return total
output:     total = 0
      for ch in str(num):
          total += int(ch)
      return total