input: Write a function to calculate the greatest common divisor of two numbers and return it. If either number is zero, return the other number as the greatest common divisor.
  assert gcd(10, 20) == 10
  assert gcd(9, 6) == 3
  assert gcd(0, 5) == 5
  assert gcd(15, 0) == 15
  assert gcd(0, 0) == 0
output: def gcd(a, b):
      if a == 0:
          return b
      if b == 0:
          return a
      while b != 0:
          a, b = b, a % b
      return a