input: Write a python function to calculate the probability of an event happening n times in a row and use it to return results.
  assert calc_prob(1) == 0.5
  assert calc_prob(2) == 0.25
  assert calc_prob(3) == 0.125
output: def calc_prob(n):
      return 0.5 ** n