def get_file_type(file_name):
    """
    returns file type of given file name as string. For example, for a pdf file "pdf" will be returned
    """
    for char in file_name:  # checking if given path instead of file
        if char == "/" or char == "\\":
            return "ERROR IN FUNCTION 3: FILE PATH GIVEN INSTEAD OF FILE NAME"
    for i in range(len(file_name)):
        j = len(file_name) - 1 - i
        if file_name[j] == ".":
            return file_name[j + 1:]
    return "ERROR: NO ENDING GIVEN TO FILE IN FUNCTION 3"