input: Write a function to calculate the greatest common divisor of two numbers and return the result. If either of the numbers is zero, return 0 as the GCD.
  
  assert gcd(10, 20) == 10
  assert gcd(0, 0) == 0
  assert gcd(12, 0) == 0
  assert gcd(0, 8) == 0
  assert gcd(25, 15) == 5
output: def gcd(a, b):
      if a == 0 or b == 0:
          return 0
      while b != 0:
          a, b = b, a % b
      return a