input: Write a python function to calculate the probability of success given a dictionary with 'success' and 'failure' counts.
  assert probability_calc({'success': 8, 'failure': 2}) == 0.8
  assert probability_calc({'success': 3, 'failure': 7}) == 0.3
  assert probability_calc({'success': 0, 'failure': 5}) == 0.0
output: def probability_calc(counts):
      total = counts['success'] + counts['failure']
      if total == 0:
          return 0.0
      return counts['success'] / total