<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def show_alerts(zap_helper, alert_level, output_format, exit_code):
 """Show alerts at the given alert level."""

    alerts = zap_helper.alerts(alert_level)

    helpers.report_alerts(alerts, output_format)

    if exit_code:
        code = 1 if len(alerts) > 0 else 0
        sys.exit(code)