input: Write a function to print the Fibonacci sequence up to a given number of terms.
  assert print_fibonacci(5) == "0 1 1 2 3"
  assert print_fibonacci(10) == "0 1 1 2 3 5 8 13 21 34"
  assert print_fibonacci(1) == "0"
  assert print_fibonacci(2) == "0 1"
output: def print_fibonacci(n):
      if n <= 0:
          return ""
      fib_sequence = [0, 1]
      while len(fib_sequence) < n:
          fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])
      return " ".join(map(str, fib_sequence[:n]))