input: Write a python function to simulate a coin toss, returning the number of heads.
  assert coin_toss(10) in range(0, 11)
  assert coin_toss(0) == 0
  assert isinstance(coin_toss(5), int)
output: import random
  
  def coin_toss(n):
      return sum(random.choice([0, 1]) for _ in range(n))