To license each part of your work under a specific license (GPLv3 for some components and MIT for others), one way is to place a header in each file or directory that states the license under which that part is distributed, and then refer to the full license text. For the MIT license, you can just use the entire full license text in your file because it is so short. For external libraries, the easiest way is to include the package unchanged in a separate directory, retaining any notices already there.
Based on your description here is one way to include the files:
gui/ ("File A", GPLv3) and gui_inter/ ("File B", GPLv3)
- Include a GPLv3 header [1] in each .py file and the full license text in a file such as LICENSE.GPL. If you decide to display Appropriate Legal Notices in your application, then anyone who uses your work as a derivative will be bound to also include such notices as interactive screens in their version. If you decide not to display notices interactively, then derivatives need not do so. See section 5(d) of the GPL Version 3.
algo/ ("File C", MIT)
- Include the full MIT license text. [2]
extern_lib/ ("File D")
- Include all the original files of the external library. If you made no changes, you have no further obligations.
pyqt/ (optional)
- Include all the original files of the external library. If you made no changes, you have no further obligations.
Must I include the Copyright statement of FileD [the external library] in my own MIT licence text of FileC [my core algorithm] or somewhere else in the environment of FileC?
This would only be required if you copy and paste the external library code (FileD) into your own program files (FileC). If you include them as separate files or directories, it will be easier to maintain and easier to tell what is what. If they are separate, then referring to FileD (the external library) from FileC (your core algorithm) would just be a technical matter of using the programming language's facilities for using external code (e.g. the 'import' keyword in Python, the '#include' directive in C, and so on).
Headers
For Python source code, you may include the copyright header as a comment (# at the beginning each line), or as a docstring as shown below. An advantage of using a docstring is that it will not be stripped out when compiled to a .pyc file:
[1] Example GPLv3 header
"""
Copyright (C) 2018 Tom Kate <user@host.com>
This file is a part of KateWare.
This file may be used under the terms of the GNU General Public License
version 3 as published by the Free Software Foundation and appearing in
the file LICENSE.GPL included in the packaging of this file.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
[2] Full MIT license text
"""
Copyright (C) 2018 Tom Kate <user@host.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
In the MIT header, I would avoid including the phrase "this file is a part of KateWare" in the header, because it may cause confusion of what Bob should write in the notice if Bob wants to include your MIT licensed parts in his BobWare application, without redistributing KateWare as a whole.
For Copyright years, if you started writing a work in a different year and published additional changes or editions, a common convention is to include additional years as a list or range after the (C) symbol. For example:
Copyright (C) 2000, 2018 ...
Copyright (C) 2015-2018 ...
For more information see Do copyright dates need to be updated? and Which year to put in copyright notice when mixing old content?