def severity_to_level(severity):
    """
    Maps severity to a level represented by number.
    """
    if severity == 'Informational':
        return 0.5
    elif severity == 'Low':
        return 1
    elif severity == 'Medium':
        return 2
    elif severity == 'High':
        return 3
    return 0