0% found this document useful (0 votes)
7 views

Getting Started With Python

Uploaded by

Arnav Pawar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Getting Started With Python

Uploaded by

Arnav Pawar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

G E T T I N G S TA R T E D W I T H

PYTHON
PYTHON INTRODUCTION
F E AT U R E S O F P Y T H O N
SHORTCOMINGS OF PYTHON
HOW TO WORK IN PYTHON
BASICS OF PYTHON PROGRAMMING
Structure of Python Program
PYTHON CHARACTER SET
I N D E N TAT I O N
• Indentation refers to the spaces applied at the beginning of a
code line. In other programming languages the indentation in
code is for readability only, where as the indentation in Python is
very important. Python uses indentation to indicate a block of
code or used in block of codes.
TOKEN
KEYWORDS
• Reserve word of the
compiler/interprete
r which can’t be
used as identifier.
IDENTIFIERS
IDENTIFIERS-CONTINUE
LITERALS
LITERALS
• Escape
sequence/Back
slash character
constants
O P E R ATO R S
• Operators can be defined as symbols that are used to perform
operations on operands.
1 . A R I T H M E T I C O P E R ATO R S
2. RELATIONAL OPERATORS/COMPARISON OPERATOR
3 . AU G M E N T E D A S S I G N M E N T O P E R ATO R S
4 . LO G I C A L O P E R ATO R S
5 . M E M B E R S H I P O P E R ATO R S
• The membership operators in Python are used to validate
whether a value is found within a sequence such as such as
strings, lists, or tuples.
6 . I D E N T I T Y O P E R ATO R S

• Identity operators in Python compare the memory locations of


two objects.
O P E R ATO R S P R E C E D E N C E
• Highest precedence to lowest precedence table. Precedence is used to decide ,which operator to
be taken first for evaluation when two or more operators comes in an expression.
P U N C T U ATO R S / D E L I M I T E R S
• Used to implement the grammatical and structure of a Syntax.
Following are the python punctuators.
BAREBONE OF A PYTHON PROGRAM
a. Expression : - which is evaluated and produce result. E.g. (20 + 4) / 4
b. Statement :- instruction that does something. e.g
a = 20
print("Calling in proper sequence")
c. Comments : which is readable for programmer but ignored by python interpreter
• i. Single line comment: Which begins with # sign.
• ii. Multi line comment (docstring): either write multiple line beginning with #
sign or use triple quoted multiple line. E.g.
‘’’this is my first python multiline comment ‘’’
d. Function a code that has some name and it can be reused.e.g. keyArgFunc in
above program
e. Block & indentation : group of statements is block.indentation at same level
create a block.e.g. all 3 statement of keyArgFunc function
VARIABLES
• Variable is a name given to a memory location. A variable can consider as a
container which holds value. Python is a type infer language that means you
don't need to specify the datatype of variable. Python automatically get variable
datatype depending upon the value assigned to the variable.
LOCAL AND GLOBAL VARIABLE
• Variable Scope And Lifetime in Python Program
CONCEPT OF L VALUE AND R VALUE IN
VARIABLE
DYNAMIC TYPING

You might also like