0% found this document useful (0 votes)
72 views22 pages

Python PPT Lesson 2

Uploaded by

printerkey12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
72 views22 pages

Python PPT Lesson 2

Uploaded by

printerkey12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 22

Lesson 2: Installing Python and PyCharm

• Now that we are acquainted with Python and its features as a programming
language, let’s begin using it. In this lesson, we will install Python and the
PyCharm IDE on a computer running on a Windows operating system.

Objectives
After studying this lesson, you should be able to:
• download the Python and PyCharm installers;
• install Python and PyCharm; and
• go over PyCharm’s features and GUI.
Installing and Downloading
Python

To download Python, visit


https://python.org.
Running the Installer The Python installation will start.
Choose Install Now.
Select the file, right-click, and choose
Run as Administrator.

A User Account Control


prompt message will
likely pop up. If it does,
choose Yes.
The installer will copy the necessary
files into your system.
Professional Community
PyCharms Community version’s key features
include: • Code Assistance
• Developer Tools
PyCharm
▪ developed by JetBrains, a Czech software development company that makes tools for
software development teams.
▪ works on multiple platforms such as Windows, macOS, and Linux versions.
▪ This will be the IDE for our Python Programming

IDE ( Integrated Development Environment )


▪ It is an application that streamlines the programming process.
▪ It features a source code editor with syntax highlighting and code completion,
provides a way to run builds quickly , and allows for easy debugging.

Two Editions of PyCharm available for download:


• COMMUNITY EDITION – a free and open-source tool but has limited features
• PROFESSIONAL EDITION – is commercial and provides more features
Installing and Downloading PyCharm

To download PyCharm, visit


https://www.jetbrains.com/
pycharm/download/
Installing PyCharm

Select the file, right-click, and choose


Run as Administrator. The PyCharm installer will start.
Click Next.

A User Account Control


prompt message will
likely pop up. If it does,
choose Yes.
Select the appropriate installation
options for your computer, then click
Next.

You can check your Windows properties (in Windows


Explorer right-click on Computer > Properties) to see
your system type.
You can also set the Start Menu The PyCharm installer will start copying
folder in which the PyCharm the files into your system.
shortcut will be placed. Click Install.
Running PyCharm for the First Time

A wizard will start, allowing


you to set some settings.

Clicking Next will bring up Featured Plugins.


Since you are just learning Python, let’s skip
this for now and click Start using Pycharm.
PyCharm will ask you what you want
to do. Click on New Project.

It defaults to a location within your


Windows user directory. Click
Create.
• Main Menu - Provides access to most of the functionalities in PyCharm. Commands are
grouped into File, Edit, View, Navigate, Code, Refactor, Run, Tools, VCS, Window, and Help.
• Toolbar - Provides quick access to the most commonly accessed tools such as Open, Save, Run,
and Debug.
• If this is not available in your first run, you can enable it by clicking View > Appearance >
Toolbar.
• Editor - The space where you work on your code.
• 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 TODO.
• Status Bar - Displays information about the project including errors and warnings.
IDLE
To launch 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.
Hello, World!
Enter this line of code:
Click the Run button.

Notice how PyCharm automatically shifts focus to the Run tool window.
print()
▪ The print() function prints the specified message or text to the screen, or other
standard output device.
▪ The message or text can be a string, or any other object, the object will be
converted into a string before written to the screen.

Syntax:
print(object(s), sep=separator, end=end, file=file, flush=flush)
print()
Syntax:
print(object(s), sep=separator, end=end, file=file, flush=flush)

Example:
• Print a message onto the screen:

Python code: Output:


print()
Syntax:
print(object(s), sep=separator, end=end, file=file, flush=flush)

Example:
• Print more than one object:

Python code: Output:


print()
Syntax:
print(object(s), sep=separator, end=end, file=file, flush=flush)

Example:
• Print two messages, and specify the separator:

Python code: Output:


• 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.
• Comments are indicated by the hash tag (#).
END OF SLIDES

You might also like