SlideShare a Scribd company logo
1 of 39
Slide 1
Module 2
Core Objects and Built-in Functions
www.ethans.co.in
Slide 2
Our Training Portfolio includes
www.ethans.co.in
Slide 3
• Python Core Objects and builtin functions
• Number Object and operations
• String Object and Operations
• List Object and Operations
• Tuple Object and operations
• Dictionary Object and operations
• Set object and operations
• Boolean Object and None Object
• Different data Structures, data processing
Objective – Module 2
Core Objects and built in functions
Slide 4 www.ethans.co.in
•Numbers - ex: 1, 1.1, 3 + 4j and 200L
•Strings – ex: ‘Ethans’ “Tech”
•List – ex: [‘Ethans’, “Tech”]
•Tuple – ex: (‘Ethans’, “Tech”)
•Dictionary - - ex: (‘Institute’:’Ethans’)
•Set - ex: set([1,2,3,4])
•Files - ex: file = open(‘file.txt’)
•None - ex: None
•Boolean - ex: True, False
Core Objects
Slide 5 www.ethans.co.in
Assignment Operator
Slide 6 www.ethans.co.in
Integers
Float
Long
Complex
Numbers
Slide 7 www.ethans.co.in
type function
Slide 8 www.ethans.co.in
Builtin functions
Slide 9 www.ethans.co.in
help
Slide 10 www.ethans.co.in
Builtin help
Slide 11 www.ethans.co.in
Number functions
Slide 12 www.ethans.co.in
Operation on numbers
Slide 13 www.ethans.co.in
Precedence Table
Operator Description
** Exponentiation (raise to the power)
~ + - Complement, unary plus and minus (method names for the last two are +@ and -@)
* / % // Multiply, divide, modulo and floor division
+ - Addition and subtraction
>> << Right and left bitwise shift
& Bitwise 'AND'
^ | Bitwise exclusive `OR' and regular `OR'
<= < > >= Comparison operators
<> == != Equality operators
= %= /= //= -= += *= **= Assignment operators
is, is not Identity operators
in, not in Membership operators
and, or, not Logical operators
Slide 14 www.ethans.co.in
Operation on numbers
Slide 15 www.ethans.co.in
String
Slide 16 www.ethans.co.in
String Functions
Slide 17 www.ethans.co.in
String Operations
Slide 18 www.ethans.co.in
String Indexing
Slide 19 www.ethans.co.in
String Slicing
Slide 20 www.ethans.co.in
String Formatting
Slide 21 www.ethans.co.in
List
The list is another datatype in Python which can be written with comma-separated
values (items) in a square brackets.
Items in a list should be of same type or different type.
Slide 22 www.ethans.co.in
List Functions
Slide 23 www.ethans.co.in
List Slicing and range function
Slide 24 www.ethans.co.in
List Data Structure
Slide 25 www.ethans.co.in
Tuple
Tuple is another datatype in Python which can be written with comma-separated
values (items) in a brackets.
Items in a tuple should be of same type or different type doesn't matter.
Slide 26 www.ethans.co.in
Difference between Tuple and List
Slide 27 www.ethans.co.in
Tuple Data Structure
Slide 28 www.ethans.co.in
Dictionary
Another builtin datatype in Python where each key is separated from its value by a
colon (:), the items are separated by commas, and the whole thing is enclosed in curly
braces.
Slide 29 www.ethans.co.in
Add and Remove Dictionary Item
Slide 30 www.ethans.co.in
Dictionaries and List, Tuple
Slide 31 www.ethans.co.in
Dictionaries data Structure
Slide 32 www.ethans.co.in
Set Object
Slide 33 www.ethans.co.in
Boolean and None Object
True and False are the pre defined
objects in Python, when comparing the
value or doing comparison operation
Python returns either True or False.
None is another object in Python.
It is similar as NULL in database.
Slide 34 www.ethans.co.in
Membership Operators
Python membership operators test for membership in a sequence or an iterable,
such as strings, lists, or tuples.
in not in
Evaluates to true if it finds a
variable in the specified sequence
and false otherwise.
Evaluates to true if it does not
finds a variable in the specified
sequence and false otherwise.
Slide 35 www.ethans.co.in
is is not
Evaluates to true if the variables
on either side of the operator
point to the same object and
false otherwise.
Evaluates to false if the variables
on either side of the operator
point to the same object and
true otherwise.
Python Identity Operator
Slide 36 www.ethans.co.in
is is not
Evaluates to true if the variables
on either side of the operator
point to the same object and
false otherwise.
Evaluates to false if the variables
on either side of the operator
point to the same object and
true otherwise.
Python Identity Operator
Slide 37 www.ethans.co.in
Quiz:
2 – What will be the output of below program?
1 – What will be the output of below program?
>>> sum([1,2,3,4,5])
>>> name = 'Ethans Technologies'
>>> name[0:6]
3 – What will be the output of below program?
>>> name = 'Ethans Technologies‘
>>> name[-1:0]
Slide 38 www.ethans.co.in
Raspberry Pi is a card-sized, inexpensive microcomputer that is being used for a
surprising range of exciting do-it-yourself stuff such as robots, remote-controlled
cars, and video game consoles.
With Python as its main programming language, the Raspberry Pi is being used
even by programmers to build radios, cameras, arcade machines, and pet
feeders!
With Raspberry Pi mania on the uptrend, there are countless DIY projects,
tutorials, and books to choose from online.
These will help you branch out from your “hello world” starter programs to
something you can truly be proud of.
Interesting Fact
Slide 39 www.ethans.co.in
Have Further Questions in Module 2?
WWW.ETHANS.CO.IN

More Related Content

Similar to Python Training in Pune - Ethans Tech Pune

Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...
Simplilearn
 
DS Complete notes for Computer science and Engineering
DS Complete notes for Computer science and EngineeringDS Complete notes for Computer science and Engineering
DS Complete notes for Computer science and Engineering
RAJASEKHARV8
 

Similar to Python Training in Pune - Ethans Tech Pune (20)

Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...
 
Python cheat-sheet
Python cheat-sheetPython cheat-sheet
Python cheat-sheet
 
Unit i(dsc++)
Unit i(dsc++)Unit i(dsc++)
Unit i(dsc++)
 
R Programming: Introduction to Vectors
R Programming: Introduction to VectorsR Programming: Introduction to Vectors
R Programming: Introduction to Vectors
 
Python Basics by Akanksha Bali
Python Basics by Akanksha BaliPython Basics by Akanksha Bali
Python Basics by Akanksha Bali
 
Python
PythonPython
Python
 
Updated Lab3.docx
Updated Lab3.docxUpdated Lab3.docx
Updated Lab3.docx
 
An Introduction To Python - Final Exam Review
An Introduction To Python - Final Exam ReviewAn Introduction To Python - Final Exam Review
An Introduction To Python - Final Exam Review
 
AI_2nd Lab.pptx
AI_2nd Lab.pptxAI_2nd Lab.pptx
AI_2nd Lab.pptx
 
INDEX SORT
INDEX SORTINDEX SORT
INDEX SORT
 
Presentation on python data type
Presentation on python data typePresentation on python data type
Presentation on python data type
 
Python-Basics.pptx
Python-Basics.pptxPython-Basics.pptx
Python-Basics.pptx
 
chapter_5_ppt_em_220247.pptx
chapter_5_ppt_em_220247.pptxchapter_5_ppt_em_220247.pptx
chapter_5_ppt_em_220247.pptx
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Two
 
Indianapolis mule soft_meetup_14_apr_2021-Review a complex Dataweave Transfor...
Indianapolis mule soft_meetup_14_apr_2021-Review a complex Dataweave Transfor...Indianapolis mule soft_meetup_14_apr_2021-Review a complex Dataweave Transfor...
Indianapolis mule soft_meetup_14_apr_2021-Review a complex Dataweave Transfor...
 
DS Complete notes for Computer science and Engineering
DS Complete notes for Computer science and EngineeringDS Complete notes for Computer science and Engineering
DS Complete notes for Computer science and Engineering
 
Computer_Science_Sr.Sec_2021-22.pdf
Computer_Science_Sr.Sec_2021-22.pdfComputer_Science_Sr.Sec_2021-22.pdf
Computer_Science_Sr.Sec_2021-22.pdf
 
9 python data structure-2
9 python data structure-29 python data structure-2
9 python data structure-2
 
Advance Python programming languages-Simple Easy learning
Advance Python programming languages-Simple Easy learningAdvance Python programming languages-Simple Easy learning
Advance Python programming languages-Simple Easy learning
 
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs DocumentationDRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 

Python Training in Pune - Ethans Tech Pune

Editor's Notes

  1. >>> import sys >>> sys.maxint 2147483647
  2. Check example