JCA Python - Middle v. 2021 Lesson 01 Foxit
JCA Python - Middle v. 2021 Lesson 01 Foxit
JCA Python - Middle v. 2021 Lesson 01 Foxit
INTRODUCTION
TO PYCHARM AND
DEBUGGER
Contents
Introduction to PyCharm................................................3
Debugger.......................................................................... 9
This lesson uses videos that have a PLAY icon over the
illustration. Click on it to watch the video.
For correct displaying the videos, we recommend opening the
lesson in the Foxit PDF Reader.
2
Introduction to PyCharm and Debugger
Introduction to PyCharm
So, you have installed PyCharm, a powerful IDE
(Integrated Development Environment).
This is a professional tool for much more convenient
work with code because it includes the following functions:
■■ text editor significantly increases the comfort of writing
code, and it highlights possible errors;
■■ library configuration automation allows you to install the
necessary libraries automatically;
■■ Debugger allows you to work with the program and identify
errors step by step.
Therefore, we will rather move on to project creation.
Click on the New Project button, and a window will
open like in Figure 1:
Figure 1
3
Lesson 1
It would help if you chose the path where the project will
be stored. It would help if you chose the virtualenv (virtu-
al environment) in the New environment using item and
placed it in the project directory, naming venv or .venv.
As a Base interpreter, choose the one that PyCharm
suggests.
For lack of guidance, ask your instructor to set Python
working.
Remove the checkmark from the Create a main.py
welcome script item.
The settings window should look like in Figure 2:
Figure 2
4
Introduction to PyCharm and Debugger
Figure 3
5
Lesson 1
Figure 4
6
Introduction to PyCharm and Debugger
Figure 5
Video 1
7
Lesson 1
The created file is opened, and you can work with it. The
window looks like in Figure 6:
Figure 6
Video 2
8
Introduction to PyCharm and Debugger
Debugger
We have recalled the first program, so let’s remember
the turtle graphics using the for loop, of course.
Erase everything and write the code to draw the wheel:
9
Lesson 1
Figure 7
Video 3
You see, the turtle drew the wheel quickly and disap-
peared, making it impossible to know the result of the
10
Introduction to PyCharm and Debugger
Video 4
11
Lesson 1
Figure 8
Figure 9
Figure 10
Figure 11
13
Lesson 1
Video 5
14
Introduction to PyCharm and Debugger
Video 6
Video 7
15
Lesson 1
16
Introduction to PyCharm and Debugger
17
Lesson 1
INTRODUCTION TO PYCHARM
AND DEBUGGER
© STEP IT Academy
www.itstep.org
All rights to protected pictures, audio, and video belong to their authors or legal owners.
Fragments of works are used exclusively in illustration purposes to the extent justified by
the purpose as part of an educational process and for educational purposes in accordance
with Article 1273 Sec. 4 of the Civil Code of the Russian Federation and Articles 21 and 23
of the Law of Ukraine “On Copyright and Related Rights”. The extent and method of cited
works are in conformity with the standards, do not conflict with a normal exploitation of
the work, and do not prejudice the legitimate interests of the authors and rightholders.
Cited fragments of works can be replaced with alternative, non-protected analogs, and
as such correspond the criteria of fair use.
All rights reserved. Any reproduction, in whole or in part, is prohibited. Agreement of the
use of works and their fragments is carried out with the authors and other right owners.
Materials from this document can be used only with resource link.
Liability for unauthorized copying and commercial use of materials is defined according
to the current legislation of Ukraine.