input: Write a python function to print the powers of 2 up to the given number.
  assert pow_2(3) == [1, 2, 4, 8]
  assert pow_2(5) == [1, 2, 4, 8, 16, 32]
  assert pow_2(0) == [1]
output: def pow_2(n):
      return [2**i for i in range(n+1)]