input: Write a python function to implement the FizzBuzz problem, which prints "Fizz" for multiples of 3, "Buzz" for multiples of 5, and "FizzBuzz" for multiples of both 3 and 5. Test the function using assert statements to verify it prints the correct output.
  assert fizzbuzz(15) == "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n13\n14\nFizzBuzz"
  assert fizzbuzz(5) == "1\n2\nFizz\n4\nBuzz"
  assert fizzbuzz(3) == "1\n2\nFizz"
output: def fizzbuzz(n):
      result = []
      for i in range(1, n + 1):
          if i % 3 == 0 and i % 5 == 0:
              result.append("FizzBuzz")
          elif i % 3 == 0:
              result.append("Fizz")
          elif i % 5 == 0:
              result.append("Buzz")
          else:
              result.append(str(i))
      return "\n".join(result)