input: Write a python function to calculate the probability of an event occurring, given the number of favorable outcomes and the total number of outcomes.
  assert calculate_probability(1, 6) == 1/6
  assert calculate_probability(2, 8) == 1/4
  assert calculate_probability(0, 5) == 0
output: def calculate_probability(favorable_outcomes, total_outcomes):
      return favorable_outcomes / total_outcomes if total_outcomes != 0 else 0