SlideShare a Scribd company logo
COMPANY NAME
Dr. Sunil Kumar
PGT
JNV Mohindergarh
Navodaya Vidyalaya Samiti
Computer Science with Python
XII (As Per CBSE Curriculum)
Will Learn……..
What is Tokens ?
What is Keyword ?
What is Identifiers ?
What is Operators ?
What is Punctuators ?
Tokens in Python
Keyword
Identifiers (Names)
Literals
Operators
Punctuators
Keywords (Tokens)
35
True, False, None
Identifiers (Tokens)
•An identifier is a user-defined name to represent a
variable, a function, a class, a module, or any other object.
•It is a programmable entity in Python- one with a name.
•It is a name given to the fundamental building blocks in a
program.
Identifiers (Tokens)
• Python identifier can be a combination of
lowercase/ uppercase letters, digits, or an
underscore.
o Lowercase letters (a to z)
o Uppercase letters (A to Z)
o Digits (0 to 9)
o Underscore (_)
• An identifier cannot begin with a digit.
Literals
String
Literals
Single Line
String
Multi-line
String
Special
literals
None
Numeric
Literals
Int(signed
integers)
Decimal
Form
Octal
Form
Hexadecimal
Form
Long(long
integers)
float(floating
point)
0.17E5
3.E2
Complex
(complex)
a+bj
Boolean
Literals
Literal
Collections
List literals, Tuple literals, Dict literals, and Set literals
Arithmetic
Operators
Relational
Operators
Assignment
Operators
Logical
Operators
Bitwise
Operator
s
Membership
Operators
Identity
Operators
Operators in Python
Arithmetic
Operator
Addition
(+)
Subtraction
(-)
Multiplication
(*)
Division
(/)
Floor
Division
(//)
Exponentiation
(**)
Modulus
(%)
Arithmetic Operators
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Punctuators
Punctuators are symbols (‘ “  () [ ] { } @ , : ‘ =) that are
used in programming language to organize sentence
structure and indicate the rhythm and emphasis of
expressions, statements and program structure
Python revision tour -I
Python revision tour -I
Subtraction
Addition
Parenthesis
Exponent
Multiplication
Division
Blocks
Expressions-Represent a Value
Statements-Programming Instructions
Comments-Readable information
Functions-Named code section
Block-Group of Statements
P
R
O
M
M
I
N
G
S
T
R
U
C
T
U
R
E
02
04
01
NUMBERS
a. Integers
a. Integers
b. Boolean
b. Floating Point Numbers
c. Complex Numbers
LIST
A list in Python represents a group of comma-
separated values of any data type between
square brackets []
TUPLE
Tuple is represented as a group of
comma-separated values of any data
type withing parenthesis ().
STRING
All strings in Python 3.0 are sequence of pure
Unicode. Unicode is a System designed to
represent every character from every
language. String can hold any type of known
character
Data Types
DICTIONARY
Dictionary is an unordered set of
comma separated key:value pairs,
within { } . No two keys can be same.
06
SET
A Set is a mutable data type which is created
like lists { }. It can take values of different
types.
02
01
MUTABLE TYPES
Mutability means that in the same memory address ,
new values can be stored as and when you want. The
types that do not support this property is known as
immutable.
IMMUTABLE TYPES
The immutable types are those that can
never change their value in place.
Integers, Floating point numbers,
Booleans, Strings, Tuples
MUTABLE AND IMMUTABLE TYPES
Type Casting
02
01
EXPLICIT TYPE CONVERSION
An Explicit type conversion is user defined
conversion that forces an expression to be of
specific type. Explicit type conversion is also
known as Type Casting.
Implicit Type Conversion
Implicit Type conversion means the type
of conversion, which is automatically
performed by the compiler.
01
The simplest statement is the empty
statement i.e., a statement which does
nothing . (pass statement)
Empty Statement
02
Compound statements are made of
simple statement. Any executable
statement is a simple statement.
Simple Statement
03
Compound Statement represents a group
of statements executed as a unit. Such type
of statement are written in specific pattern
Compound Statement
Statement Flow Control may be executed sequentially or iteratively.
Every programming language provide constructs to support sequence,
selection or iteration
Statement flow
Control
01
IF CONDITION
02
If-else
statement
03
If-elif
04
Nested if
05
Storing Condition
THE IF CONDITIONALS
Decision
Making
If Statement
Condition
True
False
Block of Code
If-else Statement
Condition
True
False
Block of Code
Block of Code
Condition 1
True
False
Block of Code
Block of Code
Block of Code
True
Condition 2
Condition 3
False
True
elif
ladder
elif
ladder
Condition 1
True
Block of Code
Block of Code
Block of Code
Condition 2
Condition 3
False
True
if
else
ladder
True
False
False
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Python revision tour -I
Nested
loops
in
Python
Python revision tour -I
break statement
continue statement

More Related Content

PDF
Doppl development iteration #2
PPTX
fundamentals of c
PDF
C Tutorial
PDF
Fundamentals of Computing and C Programming - Part 1
PPSX
Programming in c
PPTX
7.pointers
PDF
Java basic data types
PPTX
Java Datatypes
Doppl development iteration #2
fundamentals of c
C Tutorial
Fundamentals of Computing and C Programming - Part 1
Programming in c
7.pointers
Java basic data types
Java Datatypes

What's hot (20)

PDF
Complex predicate meghaditya
PDF
Lecture02(constants, variable & data types)
PDF
Fundamentals of Computing and C Programming - Part 2
PDF
Semantic Analysis of a C Program
PPTX
Why Java is not a purely object oriented language?
DOC
Week2 dq3
PPTX
c# keywords, identifiers and Naming Conventions
PPTX
What are variables and keywords in c++
PPTX
C keywords and identifiers
PPTX
Programming fundamental
DOCX
C programming tutorial
DOCX
Unit i
PPSX
INTRODUCTION TO C PROGRAMMING
PPTX
datatypes_variables_constants
PPTX
Variables and data types in C++
PDF
Java basic-data-types
PDF
Java basic data types
PDF
Doppl development iteration #4
PDF
ITFT-Constants, variables and data types in java
PPTX
Data Types and Variables In C Programming
Complex predicate meghaditya
Lecture02(constants, variable & data types)
Fundamentals of Computing and C Programming - Part 2
Semantic Analysis of a C Program
Why Java is not a purely object oriented language?
Week2 dq3
c# keywords, identifiers and Naming Conventions
What are variables and keywords in c++
C keywords and identifiers
Programming fundamental
C programming tutorial
Unit i
INTRODUCTION TO C PROGRAMMING
datatypes_variables_constants
Variables and data types in C++
Java basic-data-types
Java basic data types
Doppl development iteration #4
ITFT-Constants, variables and data types in java
Data Types and Variables In C Programming
Ad

Similar to Python revision tour -I (20)

PDF
chapter-1-review-of-python-basics-copy.pdf
PDF
Python revision tour i
PPTX
python presentation.pptx
PDF
computer science CLASS 11 AND 12 SYLLABUS.pdf
PPTX
chapter_5_ppt_em_220247.pptx
PPTX
chapter-2-eng-python-fundamentls1_1585929263876 by EasePDF.pptx
PPTX
Programming Basics.pptx
PPTX
Chapter 6 Python Fundamentals.pptx
PPTX
Chapter 6 Python Fundamentals.pptx
PPTX
CH6 - Fundamentals of Python.pptx
PPTX
data typesppt.pptxcccccccccccccccccccccccccccccccccccccccccccccc
PDF
Data Handling_XI_Finall for grade 11 cbse board
PPTX
2. Getting Started with Python second lesson .pptx
PPTX
Shivani PPt C-programing-1.pptx
PPT
17575602.ppt
PPTX
Lec1- Python Basics .pptx rrev python Funda
PPTX
Biswa Sir Python Fundamentals.pptx
PPTX
TN 12 computer Science - ppt CHAPTER-5.pptx
PPTX
Lecture 1- Python.pptxjhhhfdzdfdggcfffff
PPTX
11-unit1chapter02pythonfundamentals-180823043011.pptx
chapter-1-review-of-python-basics-copy.pdf
Python revision tour i
python presentation.pptx
computer science CLASS 11 AND 12 SYLLABUS.pdf
chapter_5_ppt_em_220247.pptx
chapter-2-eng-python-fundamentls1_1585929263876 by EasePDF.pptx
Programming Basics.pptx
Chapter 6 Python Fundamentals.pptx
Chapter 6 Python Fundamentals.pptx
CH6 - Fundamentals of Python.pptx
data typesppt.pptxcccccccccccccccccccccccccccccccccccccccccccccc
Data Handling_XI_Finall for grade 11 cbse board
2. Getting Started with Python second lesson .pptx
Shivani PPt C-programing-1.pptx
17575602.ppt
Lec1- Python Basics .pptx rrev python Funda
Biswa Sir Python Fundamentals.pptx
TN 12 computer Science - ppt CHAPTER-5.pptx
Lecture 1- Python.pptxjhhhfdzdfdggcfffff
11-unit1chapter02pythonfundamentals-180823043011.pptx
Ad

Recently uploaded (20)

PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
advance database management system book.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
IGGE1 Understanding the Self1234567891011
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
What if we spent less time fighting change, and more time building what’s rig...
Final Presentation General Medicine 03-08-2024.pptx
RMMM.pdf make it easy to upload and study
advance database management system book.pdf
Computing-Curriculum for Schools in Ghana
Complications of Minimal Access Surgery at WLH
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
IGGE1 Understanding the Self1234567891011
Weekly quiz Compilation Jan -July 25.pdf
Orientation - ARALprogram of Deped to the Parents.pptx
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Empowerment Technology for Senior High School Guide
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
History, Philosophy and sociology of education (1).pptx
Final Presentation General Medicine 03-08-2024.pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
What if we spent less time fighting change, and more time building what’s rig...

Python revision tour -I