input: Write a function to output a list of integers representing the Fibonacci sequence up to the nth term. The function should accept an integer n as input and return a list of length n, where the first two elements are 0 and 1, and each subsequent element is the sum of the two preceding elements. If n is less than or equal to 0, return an empty list.
  
  def fibonacci_sequence(n):
      if n <= 0:
          return []
      fib_list = [0] * n
      fib_list[0] = 0
      if n > 1:
          fib_list[1] = 1
      for i in range(2, n):
          fib_list[i] = fib_list[i-1] + fib_list[i-2]
      return fib_list
  
  assert fibonacci_sequence(5) == [0, 1, 1, 2, 3]
  assert fibonacci_sequence(10) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
  assert fibonacci_sequence(1) == [0]
  assert fibonacci_sequence(0) == []
  assert fibonacci_sequence(-3) == []
output: def fibonacci_sequence(n):
      if n <= 0:
          return []
      fib_list = [0] * n
      fib_list[0] = 0
      if n > 1:
          fib_list[1] = 1
      for i in range(2, n):
          fib_list[i] = fib_list[i-1] + fib_list[i-2]
      return fib_list