def checkQuantity(quantity, n):
  """
    Checks if n is matches the quantity parameter.
    @ In, quantity, Quantity, the quantity value to check against
    @ In, n, int, the value to check against
    @ Out, match, bool, True if the n is an allowed quantity.
  """
  start, end = quantity.value
  match = n >= start
  if end == 1:
    match = match and n <= 1
  return match