KEMBAR78
Introduction to Python Programming Language | PPTX
Introduction to
Python
ARNOLD R. HIPOLITO JR.
Python
SIMPLE GENERAL-
PURPOSE
HIGH-LEVEL INTERPRETED
PYTHON
FEATUR
ES
Free
Open-source
Easy to use
Readable
Very clear syntax – simpler,
shorter
No type declarations
Uses indentation
PYTHON
ORIGIN
CREATOR
• Guido van Rossum,
1991
WHY WAS IT
NAMED
PYTHON?
GUIDO’S
FAVORITE
TV SHOW
Monty Python’s Flying
Circus, BBC
Real-World
Applications
of Python
Web
Develop
ment
Game
Development
Artificial
Intelligenc
e
PYTHON: HOW
TO TALK?
Syntax on Strings
print() – built-in
function that
allows an output
of text or number
Syntax:
print(“Hello,
World!”)
print(‘Hello,
World!’)
Single
Quote
Inside
double
quote &
Vice
versa
•Syntax:
• print(“Hello, ‘World’!”)
• print(‘Hello, “World”!’)
SYNTAX ON NUMBERS
No quotation
marks needed
Syntax:
print(10)
print(3.141592
6)
When to pause: ESCAPE
SEQUENCES
Special characters
characterized by a backslash
() and letter or symbol beside
it.
Used in print() to show:
• spaces
• new lines
• symbols that cannot be
outputted using normal print()
t
Prints a horizontal
tab space.
print("HellotWorld!")
N
Prints the
proceeding text to a
new line.
print("HellonWorld!"
)
Another
WAY:
multiple
print()
statemen
ts
print("This is
Line 1")
print("This is
Line 2")
ANOTHE
R:
USING
TRIPLE
SINGLE
QUOTES
OR
DOUBLE
print(‘’’This is
Line 1
This is Line 2’’’)
’
Prints a single quote inside texts enclosed in double quotes.
“
Prints a double quote inside texts enclosed in double quotes.
prints a
backslash
PYTHON
PLACEH
OLDERS
A formatting specifier that
will be replaced by a value
corresponding to its data
type.
Syntax: print("placeholder"
% <value_here>)
%c
Represents a single letter or
symbol.
Syntax: print("%c" % "a")
%s
Represents a group of
characters.
1
Syntax: print("%s" % "I love
programming")
2
%d
Represents a whole
number.
Syntax: print("%d" % 22)
%f
Represents a number with
decimal points.
Syntax: print("%f" % 3.41)

Introduction to Python Programming Language