def determine_player_url(player_id):
    """Determine the Player's Page URL from player's ID.

    Raises:
        SystemExit: index error if ID blank

    Args:
        player_id: inputted player ID

    Returns:
        URL for player based on ID
    """
    if not player_id:
        raise SystemExit(IndexError)
    base_url = 'https://www.basketball-reference.com/players/'
    return '{base}{last_initial}/{ID}.html'.format(
        base=base_url,
        last_initial=player_id[0],
        ID=player_id,
    )