COMPUTER
Expressive. Fewer lines of code can accomplish
more.
Extensible. Can interface with other languages.
Lesson 1 (1st Quarter Unit): Python Overview Available Libraries. Has thousands of readily
available functionalities.
INTRODUCING PYTHON
Support for GUI. It helps you build applications with
Computers are machines, and they only understand visual interfaces.
binary or sequences of ones and zeroes. Cross-platform Development. Development can be
Programming languages allow us to write done on both Windows and Mac.
instructions in a way that is understandable to Free and Open-source. You do not have to pay
humans. anything to use or run Python.
A compiler or an interpreter is then used to
translate these instructions into binary.
PYTHON'S USES AND APPLICATIONS
This process of writing instructions using a
programming language is called coding. Web Applications
Data and Analytics
Research
PYTHON’S ORIGINS
Artificial Intelligence (AI) and Machine Learning
Python's development started in the late 1980s. (ML)
Its inventor, Guido van Rossum, worked at the Business and Enterprise
Dutch research institute CWI. Game Development
ABC programming was a general- purpose language Internet-of-Things
and was mainly used for teaching and prototyping. Lesson 2 (1st Quarter Unit): Installing Python and
Implementation of Python started in late 1989. Pycharm
The language was named after the popular British
television show, Monty Python's Flying Circus.
Python 1.0 was released in 1994. The version
included functions such as lambda, map, filter, and
reduce.
Python 2.0 was released in 2000 and added
features such as garbage collection and list
comprehensions.
Version 3.0 came out in 2008 and promised to solve
inherent issues with the older versions.
Today, Python is one of the most popular
programming languages in the world.
PYTHON'S KEY FEATURES RUNNING THE INSTALLER
Easy-to-Use. Python is an easy programming Select the file, and choose Run as Administrator.
language to learn. It reads just like simple English. A User Account Control prompt message will likely
Interpreted. Python's interpreter is platform- pop up, if it does, choose Yes.
independent. Interpreted languages are also easy to The Python installation will start. Choose Install
debug. Now.
High-level. No need to worry about memory The installer will copy the necessary files into your
management. system.
Dynamically-Typed. You do not have to specify the Once the process has finished, the installer will
type of a variable before you can use it. The indicate that the installer will indicate that the
interpreter will do it for you. installation was successful.
PYCHARM You can also set the Start Menu folder in which the
PyCharm shortcut will be placed. Click Install.
PyCharm is developed by JetBrains, a Czech
The PyCharm installer will start copying the files into
software development company that makes tools
your system. A bar will appear indicating the
for software development teams.
progress. Once it finishes, you may be prompted to
PyCharm works on multiple platforms such as
restart your computer.
Windows, macOS, and Linux versions.
An Integrated Development Environment (IDE) is
an application that streamlines the programming RUNNING PYCHARM FOR THE FIRST TIME
process. It features a source code editor with syntax
After you have finished the installation process (or
highlighting and code completion, provides a way to
have restarted your system), launch PyCharm for
run builds quickly, and allows for easy debugging.
the first time.
There are two editions of PyCharm available for
A wizard will start, allowing you to set some
download on the JetBrain’s website:
settings. You can select a theme for the graphical
The Community edition is a free and open-source
user interface (GUI). You can select between a dark
tool but has limited features.
or light theme.
The Professional edition is commercial and provides
Clicking Next will bring up Features Plugins. Since
more features, including support for web
you are just learning Python, let’s skip this for now
frameworks.
and click Start using PyCharm.
PyCharm will ask you what you want to do. Click on
PYCHARM FEATURES New Project.
This will bring up options on where you would want
PyCharm’s Community key features include:
to place your project files. It defaults to a location
Code Assistance. PyCharm’s code editor provides within your Windows user directory. Click Create.
syntax highlighting and formatting, which makes the
code easier to track and read. It also highlights
THE PYCHARM GUI
errors so that you can readily fix syntax errors. It
also has navigation features that allow you to search
all parts of your code comprehensively.
Developer Tools. PyCharm allows you to run and
test code from within the IDE. It has a debugger and
test runners. It also supports version control
systems such as Git and Subversion.
INSTALLER PYCHARM
Run the installer that you just downloaded.
Select the file, right-click, and choose Run as
Administrator. A User Account Control prompt
message will pop up, choose Yes. Main Menu – Provides access to most of the
The PyCharm installer will start. Click Next. functionalities in PyCharm. Commands are group
In the installation options, you can select 64-bit into File, Edit, View, Navigate, Code, Refactor, Run,
launcher if your system is running a 64-bit version of Tools, VCS, Window, and help.
Windows. Select the appropriate installation Toolbar – Provides quick access to the most
options for your compute, then click Next. commonly accessed tools such as Open, Save, Run,
You can check your Windows properties (in and Debug.
Windows Explorer right-click on Computer > Editor – The space where you work on your code.
Properties) to see your system type. Navigation Bar – Allows you to navigate the files
and folder of your project.
Tool Window Bars – Located at the edges of the
GUI. Can be toggled to show the various tools
including Project, Favorites, Problems, Structure,
Services, Event Log, Python Console, Terminal, and
To Do.
Status Bar – Displays information about the project
including errors and warnings.
IDLE
Integrated Development and Learning Environment
(IDLE)
To lunch IDLE, just click on the Windows Start Menu
> Python > IDLE.
To open the editor, click File > New File or press Ctrl
+N
Idle also supports syntax highlighting,
autocompletion, and smart indent.
You can save your Python (.py) files and run them
within IDLE.
COMMENTS
Comments are lines of code that are meant to
provide information to yourself or your fellow
programmers who would want to see how your
code works. They are excluded by the interpreter.
Comments are indicated by the harsh (#). In the
editor, comments will display in a different color
from a runnable code.