input: Write a function to generate Fibonacci sequence up to a given limit.
  assert generate_fibonacci(1) == [0]
  assert generate_fibonacci(5) == [0, 1, 1, 2, 3]
  assert generate_fibonacci(10) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
output: def generate_fibonacci(limit):
      if limit <= 0:
          return []
      sequence = [0]
      next_value = 1
      while len(sequence) < limit:
          sequence.append(next_value)
          next_value = sequence[-1] + sequence[-2]
      return sequence