input: Write a function to calculate the sum of a sequence of integers. If the sequence is empty, return 0. The function should take a list of integers as input and return the sum of the integers in the list.
  
  def sum_sequence(sequence):
    if not sequence:
      return 0
    sum = 0
    for num in sequence:
      sum += num
    return sum
  
  assert sum_sequence([1, 2, 3, 4, 5])==15
  assert sum_sequence([-1, 0, 1])==0
  assert sum_sequence([0])==0
  assert sum_sequence([-5, -3, -1, 1, 3, 5])==0
  assert sum_sequence([])==0
output: def sum_sequence(sequence):
    if not sequence:
      return 0
    sum = 0
    for num in sequence:
      sum += num
    return sum