Generate a python program to check the sum of two numbers and determine if they are equal or not.
Compare a = 4 and b = 6
def compare_sum(a, b):
  if a + b == 10:
    return True
  else:
    return False