input: Write a function to calculate the Fibonacci numbers up to a given number. The function should return the Fibonacci sequence as a list of numbers up to the given number. If the given number is zero, return a list containing only zero.
  
  def Fibonacci(n):
      if n == 0:
          return [0]
      elif n == 1:
          return [0, 1]
      else:
          fib_seq = [0, 1]
          while fib_seq[-1] + fib_seq[-2] <= n:
              fib_seq.append(fib_seq[-1] + fib_seq[-2])
          return fib_seq
  
  assert Fibonacci(0) == [0]
  assert Fibonacci(1) == [0, 1]
  assert Fibonacci(2) == [0, 1, 1, 2]
  assert Fibonacci(10) == [0, 1, 1, 2, 3, 5, 8]
  assert Fibonacci(21) == [0, 1, 1, 2, 3, 5, 8, 13, 21]
  assert Fibonacci(50) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
output: def Fibonacci(n):
      if n == 0:
          return [0]
      elif n == 1:
          return [0, 1]
      else:
          fib_seq = [0, 1]
          while fib_seq[-1] + fib_seq[-2] <= n:
              fib_seq.append(fib_seq[-1] + fib_seq[-2])
          return fib_seq