input: Write a python function to generate the Fibonacci sequence up to a given number of terms.
  assert fibonacci_sequence(5) == [1, 2, 3, 5, 8]
  assert fibonacci_sequence(7) == [1, 2, 3, 5, 8, 13, 21]
  assert fibonacci_sequence(10) == [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
output: def fibonacci_sequence(n):
      if n <= 0:
          return []
      elif n == 1:
          return [1]
      sequence = [1, 2]
      while len(sequence) < n:
          next_term = sequence[-1] + sequence[-2]
          sequence.append(next_term)
      return sequence