def set_file_name(fig_name, fmt):
    """
    Returns a file name with the base given by fig_name and the extension
    given by fmt.
    
    Parameters
    ----------
    fig_name : str
        base name string
    fmt : str
        extension of the figure (e.g. png, pdf, eps)
        
    Returns
    --------
    filename : str
        a string of the form "fig_name.fmt"
        
    Example
    -------
    set_file_name("figure","jpg") returns "figure.jpg"
    
    """
    
    if not isinstance(fig_name, str):
        raise TypeError("fig_name must be a string.")
    if not isinstance(fmt, str):
        raise TypeError("fmt must be a string.")
    
    if len(fig_name) == 0:
        raise ValueError("fig_name must contain at least one character.")
    if len(fmt) == 0:
        raise ValueError("fmt must contain at least one character.")
    
    filename = fig_name + "." + fmt
    
    return filename
    
    ####################