SlideShare a Scribd company logo
What is Python?
Features of Python
Who uses Python?
Starting off with Python Basics
❖Data Types
❖Operators
❖Flow Control
❖Functions
❖File Handling
www.edureka.co
www.edureka.co/python
www.edureka.co/python
What is Python?
• Created by Guido Van Rossum in 1989
• Inspired by his favorite show’s(Flying Circus)
creator ‘Monty Python’
• High Level, Interpreted language with easy syntax
and dynamic semantics
www.edureka.co/python
Open Source
OOPS
Large Standard
Library
Easy to Learn
www.edureka.co/python
Features of Python
Python is designed such that you think more of the code and less of the syntax
www.edureka.co/python
Simplicity
Features of Python
Being Open Source is awesome, which means that Python is free for everyone to use
www.edureka.co/python
Open Source
Features of Python
Python code can be written in one computer and executed in another without any
hassles, making code sharing much easier
www.edureka.co/python
Portability
Features of Python
Python allows code of other languages such as C, C++ to be embedded into it so that certain functions
can be performed, making Python even more powerful
www.edureka.co/python
Embeddable
and Extensible
Features of Python
The tasks of CPU and Memory Management are handled by Python itself
www.edureka.co/python
Interpreted
Features of Python
Python has a huge set of libraries such as NumPy, Matplotlib and Scikit-learn which help in solving problems
www.edureka.co/python
Huge
Libraries
Features of Python
Object Orientation helps break down complex problems of the world into code and
help provide security to it to obtain better solutions
www.edureka.co/python
Object
Orientation
www.edureka.co/python
Who uses
Python?
www.edureka.co/python
www.edureka.co/python
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
www.edureka.co
www.edureka.co/python
Starting off with Python Basics
Head over to python.org to install Python
Download Section -> Download latest version
www.edureka.co/python
Installing Python on Windows
Check this box
Click Install Now
www.edureka.co/python
Python IDLE
Open IDLE which is bundled with Python for development
purposes
www.edureka.co/python
First Program with Python
www.edureka.co/python
Downloading PyCharm
www.edureka.co/python
Head over to this link
Download the version you want to
https://www.jetbrains.com/pycharm/download/
Program with PyCharm
www.edureka.co/python
Program 1 :
Program 2 :
a = 10
b = 20
c = a + b
print('The addition of a and b is: %d' % c)
a = int(input('Enter number for a: '))
b = int(input('Enter number for b: '))
print('The addition of a and b is: %d' % (a + b))
www.edureka.co/python
Data Types in Python
www.edureka.co/python
Numeric
Lists
Tuples
Dictionary
Sets
Strings
www.edureka.co/python
• Numeric Data types
are used to store
numerical values in
the variables
• Numeric data types
are not mutable
Types Examples
Integer 1, 5, 356
Float 3.142
Complex 10 + 3j
Data Types in Python
Numeric
Lists
Tuples
Dictionary
Sets
Strings
www.edureka.co/python
• Lists are the same as arrays
• Lists can have heterogenous
data types in them
• Lists are mutable
Data Types in Python
Example:
a = [1, ‘Hindi’, 3.142, 10+6j]
Numeric
Lists
Tuples
Dictionary
Sets
Strings
www.edureka.co/python
• Tuples are the same as lists
with the exception that they
are not mutable
• This makes Tuples faster than
lists
Example:
a = (1, ‘Hindi’, 3.142, 10+6j)
Data Types in Python
Numeric
Lists
Tuples
Dictionary
Sets
Strings
www.edureka.co/python
• Dictionaries are used to hold
key, value pairs
• Dictionaries are mutable
Data Types in Python
Example:
mydict = { ‘Name’ : ‘Akash’,
‘Sign’ : ‘Libra’ }
Numeric
Lists
Tuples
Dictionary
Sets
Strings
www.edureka.co/python
• Sets are un-ordered
collection of unique
elements
• Sets are mutable
Example:
a = {1, 2, 3, 4, 4, 5}
Data Types in Python
Numeric
Lists
Tuples
Dictionary
Sets
Strings
www.edureka.co/python
• Strings are a collection of
characters
• They are written within
single (‘’) or double (“”)
quotation marks
• Strings are not mutable
Example:
string = ‘Welcome to edureka!’
Data Types in Python
Numeric
Lists
Tuples
Dictionary
Sets
Strings
www.edureka.co/python
Operators in Python
• Operators are constructs you use to manipulate data
• Describes actions that need to be done
• Derive information from data or manipulate them to obtain
solutions
www.edureka.co/python
01 Arithmetic Operators
02 Assignment Operators
03 Comparison Operators
04 Logical Operators
05 Bitwise Operators
06 Identity Operators
07 Membership Operators
Operators
Used to perform arithmetic operations
www.edureka.co/python
Operator Description
+ Adds 2 numbers
- Subtracts 2 numbers
* Multiplies 2 numbers
/ Divide the numbers
% Find remainder
** Raise to the power
01 Arithmetic Operators
02 Assignment Operators
03 Comparison Operators
04 Logical Operators
05 Bitwise Operators
06 Identity Operators
07 Membership Operators
Operators
Used to assign values to variables
www.edureka.co/python
Operator Description
= Assign the value
+= Add and assign
-= Subtract and assign
*= Multiply and assign
/= Divide and assign
%= Find remainder and assign
**= Find exponential and assign
01 Arithmetic Operators
02 Assignment Operators
03 Comparison Operators
04 Logical Operators
05 Bitwise Operators
06 Identity Operators
07 Membership Operators
Operators
Used to compare values
www.edureka.co/python
Operator Description
== Compare if true
!= Compare if not true
< Check if less than
> Check if greater than
<= Check if lesser or equal to
>= Check if greater or equal to
01 Arithmetic Operators
02 Assignment Operators
03 Comparison Operators
04 Logical Operators
05 Bitwise Operators
06 Identity Operators
07 Membership Operators
Operators
Used to obtain logic from the operands
www.edureka.co/python
Operator Description
and True if both are true
or True if either is true
not Gives the opposite
01 Arithmetic Operators
02 Assignment Operators
03 Comparison Operators
04 Logical Operators
05 Bitwise Operators
06 Identity Operators
07 Membership Operators
Operators
Used to manipulate the bits of the value directly.
www.edureka.co/python
Operator Description
& Bitwise AND
| Bitwise OR
^ Bitwise XOR
~ Give 1’s Complement
<< Perform left shift
>> Perform right shift
01 Arithmetic Operators
02 Assignment Operators
03 Comparison Operators
04 Logical Operators
05 Bitwise Operators
06 Identity Operators
07 Membership Operators
Operators
Check whether values are identical or not
www.edureka.co/python
Operator Description
is If identical, then true
is not If not identical, then true
01 Arithmetic Operators
02 Assignment Operators
03 Comparison Operators
04 Logical Operators
05 Bitwise Operators
06 Identity Operators
07 Membership Operators
Operators
www.edureka.co/python
Check whether a value exists or not
Operator Description
in True if element exists
not in True if element not present
01 Arithmetic Operators
02 Assignment Operators
03 Comparison Operators
04 Logical Operators
05 Bitwise Operators
06 Identity Operators
07 Membership Operators
www.edureka.co/python
Flow Control
Parts of the code where the sequence must alter, flow control comes to the rescue
www.edureka.co/python
Loops
Conditional
Statements
Flow Control
If-else
while
for
Conditional Statements
• Conditional statements in Python are if-else
statements
• This is a simple if-else ladder
• if-else can be within other if-else conditions called as
nested conditions
www.edureka.co/python
Loops
Loops are used when we want to execute a certain set of statements for different inputs several times
www.edureka.co/python
Statement
Initialization
Condition
Increment
/Decrement
False
True
START
END
Statement
Condition
False
True
START
END
For Loop While Loop
www.edureka.co/python
Functions in Python
• Functions are blocks of code which are run whenever called
• Functions reduce redundancy and increase readability
• Python supports pass by object
Function
Built-in Function
User Defined
Function
www.edureka.co/python
www.edureka.co/python
File Handling
Python provides methods to handle files where
we can read and write data into it
Steps:
• Open a file
• Perform operations
• Close file
You need to make sure that you close the file to
avoid damaging data in the file
open ( filename, mode )
write( )
close( )
read( )
File Operations in Python
Opening a file
Reading a file
Writing a file
Closing a file
www.edureka.co/python
www.edureka.co/python
What is Python? Features of Python Who uses Python?
Starting off with Python Data Types in Python Operators in Python
Summary
www.edureka.co/python
Summary
www.edureka.co/python
Flow Control
Function
Built-in Function
User Defined Function
Functions File Handling in Python
Function
Built-in Function
User Defined Function
www.edureka.co/python

More Related Content

What's hot

Python
PythonPython
Python
Aashish Jain
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
 
Programming with Python
Programming with PythonProgramming with Python
Programming with Python
Rasan Samarasinghe
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
Paige Bailey
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
AnirudhaGaikwad4
 
What is Python? | Edureka
What is Python? | EdurekaWhat is Python? | Edureka
What is Python? | Edureka
Edureka!
 
Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
Pedro Rodrigues
 
Python Class | Python Programming | Python Tutorial | Edureka
Python Class | Python Programming | Python Tutorial | EdurekaPython Class | Python Programming | Python Tutorial | Edureka
Python Class | Python Programming | Python Tutorial | Edureka
Edureka!
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02
Fariz Darari
 
Python programming
Python  programmingPython  programming
Python programming
Ashwin Kumar Ramasamy
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
St. Petersburg College
 
Python made easy
Python made easy Python made easy
Python made easy
Abhishek kumar
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
Dipankar Achinta
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Ayshwarya Baburam
 
Basics of python
Basics of pythonBasics of python
Basics of python
Jatin Kochhar
 
Python for Data Science with Anaconda
Python for Data Science with AnacondaPython for Data Science with Anaconda
Python for Data Science with Anaconda
Travis Oliphant
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
Samir Mohanty
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
KrishnaMildain
 

What's hot (20)

Python
PythonPython
Python
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Programming with Python
Programming with PythonProgramming with Python
Programming with Python
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
What is Python? | Edureka
What is Python? | EdurekaWhat is Python? | Edureka
What is Python? | Edureka
 
Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
 
Python Class | Python Programming | Python Tutorial | Edureka
Python Class | Python Programming | Python Tutorial | EdurekaPython Class | Python Programming | Python Tutorial | Edureka
Python Class | Python Programming | Python Tutorial | Edureka
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02
 
Python programming
Python  programmingPython  programming
Python programming
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
 
Python made easy
Python made easy Python made easy
Python made easy
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Basics of python
Basics of pythonBasics of python
Basics of python
 
Python for Data Science with Anaconda
Python for Data Science with AnacondaPython for Data Science with Anaconda
Python for Data Science with Anaconda
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
 
Python - the basics
Python - the basicsPython - the basics
Python - the basics
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 

Similar to Python Basics | Python Tutorial | Edureka

Python Operators.pdf
Python Operators.pdfPython Operators.pdf
Python Operators.pdf
SudhanshiBakre1
 
1. PGA2.0-Python Programming-Intro to Python.pptx
1. PGA2.0-Python Programming-Intro to Python.pptx1. PGA2.0-Python Programming-Intro to Python.pptx
1. PGA2.0-Python Programming-Intro to Python.pptx
Rakesh Ahuja
 
Introduction to Python.pdf
Introduction to Python.pdfIntroduction to Python.pdf
Introduction to Python.pdf
Rahul Mogal
 
Welcome to python workshop
Welcome to python workshopWelcome to python workshop
Welcome to python workshop
Mukul Kirti Verma
 
modul-python-all.pptx
modul-python-all.pptxmodul-python-all.pptx
modul-python-all.pptx
Yusuf Ayuba
 
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
sherinjoyson
 
1.4 Work with data types and variables, numeric data, string data.pptx
1.4 Work with data types and variables, numeric data, string data.pptx1.4 Work with data types and variables, numeric data, string data.pptx
1.4 Work with data types and variables, numeric data, string data.pptx
VGaneshKarthikeyan
 
Python PPT.pptx
Python PPT.pptxPython PPT.pptx
Python PPT.pptx
JosephMuez2
 
Introduction of Python
Introduction of PythonIntroduction of Python
Introduction of Python
ZENUS INFOTECH INDIA PVT. LTD.
 
Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.
supriyasarkar38
 
Python-Certification-Training-Day-1-2.pptx
Python-Certification-Training-Day-1-2.pptxPython-Certification-Training-Day-1-2.pptx
Python-Certification-Training-Day-1-2.pptx
muzammildev46gmailco
 
Python Programming | JNTUK | UNIT 1 | Lecture 5
Python Programming | JNTUK | UNIT 1 | Lecture 5Python Programming | JNTUK | UNIT 1 | Lecture 5
Python Programming | JNTUK | UNIT 1 | Lecture 5
FabMinds
 
Python Basics by Akanksha Bali
Python Basics by Akanksha BaliPython Basics by Akanksha Bali
Python Basics by Akanksha Bali
Akanksha Bali
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
Dozie Agbo
 
Pa2 session 4
Pa2 session 4Pa2 session 4
Pa2 session 4
aiclub_slides
 
Ch-3.pdf
Ch-3.pdfCh-3.pdf
PE1 Module 2.ppt
PE1 Module 2.pptPE1 Module 2.ppt
PE1 Module 2.ppt
balewayalew
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
Unit-I-PPT-1.ppt
Unit-I-PPT-1.pptUnit-I-PPT-1.ppt
Unit-I-PPT-1.ppt
Chinmaya M. N
 

Similar to Python Basics | Python Tutorial | Edureka (20)

Python Operators.pdf
Python Operators.pdfPython Operators.pdf
Python Operators.pdf
 
1. PGA2.0-Python Programming-Intro to Python.pptx
1. PGA2.0-Python Programming-Intro to Python.pptx1. PGA2.0-Python Programming-Intro to Python.pptx
1. PGA2.0-Python Programming-Intro to Python.pptx
 
Introduction to Python.pdf
Introduction to Python.pdfIntroduction to Python.pdf
Introduction to Python.pdf
 
Welcome to python workshop
Welcome to python workshopWelcome to python workshop
Welcome to python workshop
 
modul-python-all.pptx
modul-python-all.pptxmodul-python-all.pptx
modul-python-all.pptx
 
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
 
1.4 Work with data types and variables, numeric data, string data.pptx
1.4 Work with data types and variables, numeric data, string data.pptx1.4 Work with data types and variables, numeric data, string data.pptx
1.4 Work with data types and variables, numeric data, string data.pptx
 
Python PPT.pptx
Python PPT.pptxPython PPT.pptx
Python PPT.pptx
 
Introduction of Python
Introduction of PythonIntroduction of Python
Introduction of Python
 
Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.
 
Python-Certification-Training-Day-1-2.pptx
Python-Certification-Training-Day-1-2.pptxPython-Certification-Training-Day-1-2.pptx
Python-Certification-Training-Day-1-2.pptx
 
Python Programming | JNTUK | UNIT 1 | Lecture 5
Python Programming | JNTUK | UNIT 1 | Lecture 5Python Programming | JNTUK | UNIT 1 | Lecture 5
Python Programming | JNTUK | UNIT 1 | Lecture 5
 
Python Basics by Akanksha Bali
Python Basics by Akanksha BaliPython Basics by Akanksha Bali
Python Basics by Akanksha Bali
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
 
INTERNSHIP REPORT.docx
 INTERNSHIP REPORT.docx INTERNSHIP REPORT.docx
INTERNSHIP REPORT.docx
 
Pa2 session 4
Pa2 session 4Pa2 session 4
Pa2 session 4
 
Ch-3.pdf
Ch-3.pdfCh-3.pdf
Ch-3.pdf
 
PE1 Module 2.ppt
PE1 Module 2.pptPE1 Module 2.ppt
PE1 Module 2.ppt
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
 
Unit-I-PPT-1.ppt
Unit-I-PPT-1.pptUnit-I-PPT-1.ppt
Unit-I-PPT-1.ppt
 

More from Edureka!

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka
ITIL® Tutorial for Beginners | ITIL® Foundation Training | EdurekaITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka
Edureka!
 

More from Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka
ITIL® Tutorial for Beginners | ITIL® Foundation Training | EdurekaITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka
 

Recently uploaded

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 

Python Basics | Python Tutorial | Edureka

  • 1.
  • 2. What is Python? Features of Python Who uses Python? Starting off with Python Basics ❖Data Types ❖Operators ❖Flow Control ❖Functions ❖File Handling www.edureka.co www.edureka.co/python
  • 4. What is Python? • Created by Guido Van Rossum in 1989 • Inspired by his favorite show’s(Flying Circus) creator ‘Monty Python’ • High Level, Interpreted language with easy syntax and dynamic semantics www.edureka.co/python Open Source OOPS Large Standard Library Easy to Learn
  • 6. Features of Python Python is designed such that you think more of the code and less of the syntax www.edureka.co/python Simplicity
  • 7. Features of Python Being Open Source is awesome, which means that Python is free for everyone to use www.edureka.co/python Open Source
  • 8. Features of Python Python code can be written in one computer and executed in another without any hassles, making code sharing much easier www.edureka.co/python Portability
  • 9. Features of Python Python allows code of other languages such as C, C++ to be embedded into it so that certain functions can be performed, making Python even more powerful www.edureka.co/python Embeddable and Extensible
  • 10. Features of Python The tasks of CPU and Memory Management are handled by Python itself www.edureka.co/python Interpreted
  • 11. Features of Python Python has a huge set of libraries such as NumPy, Matplotlib and Scikit-learn which help in solving problems www.edureka.co/python Huge Libraries
  • 12. Features of Python Object Orientation helps break down complex problems of the world into code and help provide security to it to obtain better solutions www.edureka.co/python Object Orientation
  • 16. Copyright © 2017, edureka and/or its affiliates. All rights reserved. www.edureka.co www.edureka.co/python
  • 17. Starting off with Python Basics Head over to python.org to install Python Download Section -> Download latest version www.edureka.co/python
  • 18. Installing Python on Windows Check this box Click Install Now www.edureka.co/python
  • 19. Python IDLE Open IDLE which is bundled with Python for development purposes www.edureka.co/python
  • 20. First Program with Python www.edureka.co/python
  • 21. Downloading PyCharm www.edureka.co/python Head over to this link Download the version you want to https://www.jetbrains.com/pycharm/download/
  • 22. Program with PyCharm www.edureka.co/python Program 1 : Program 2 : a = 10 b = 20 c = a + b print('The addition of a and b is: %d' % c) a = int(input('Enter number for a: ')) b = int(input('Enter number for b: ')) print('The addition of a and b is: %d' % (a + b))
  • 24. Data Types in Python www.edureka.co/python Numeric Lists Tuples Dictionary Sets Strings
  • 25. www.edureka.co/python • Numeric Data types are used to store numerical values in the variables • Numeric data types are not mutable Types Examples Integer 1, 5, 356 Float 3.142 Complex 10 + 3j Data Types in Python Numeric Lists Tuples Dictionary Sets Strings
  • 26. www.edureka.co/python • Lists are the same as arrays • Lists can have heterogenous data types in them • Lists are mutable Data Types in Python Example: a = [1, ‘Hindi’, 3.142, 10+6j] Numeric Lists Tuples Dictionary Sets Strings
  • 27. www.edureka.co/python • Tuples are the same as lists with the exception that they are not mutable • This makes Tuples faster than lists Example: a = (1, ‘Hindi’, 3.142, 10+6j) Data Types in Python Numeric Lists Tuples Dictionary Sets Strings
  • 28. www.edureka.co/python • Dictionaries are used to hold key, value pairs • Dictionaries are mutable Data Types in Python Example: mydict = { ‘Name’ : ‘Akash’, ‘Sign’ : ‘Libra’ } Numeric Lists Tuples Dictionary Sets Strings
  • 29. www.edureka.co/python • Sets are un-ordered collection of unique elements • Sets are mutable Example: a = {1, 2, 3, 4, 4, 5} Data Types in Python Numeric Lists Tuples Dictionary Sets Strings
  • 30. www.edureka.co/python • Strings are a collection of characters • They are written within single (‘’) or double (“”) quotation marks • Strings are not mutable Example: string = ‘Welcome to edureka!’ Data Types in Python Numeric Lists Tuples Dictionary Sets Strings
  • 32. Operators in Python • Operators are constructs you use to manipulate data • Describes actions that need to be done • Derive information from data or manipulate them to obtain solutions www.edureka.co/python 01 Arithmetic Operators 02 Assignment Operators 03 Comparison Operators 04 Logical Operators 05 Bitwise Operators 06 Identity Operators 07 Membership Operators
  • 33. Operators Used to perform arithmetic operations www.edureka.co/python Operator Description + Adds 2 numbers - Subtracts 2 numbers * Multiplies 2 numbers / Divide the numbers % Find remainder ** Raise to the power 01 Arithmetic Operators 02 Assignment Operators 03 Comparison Operators 04 Logical Operators 05 Bitwise Operators 06 Identity Operators 07 Membership Operators
  • 34. Operators Used to assign values to variables www.edureka.co/python Operator Description = Assign the value += Add and assign -= Subtract and assign *= Multiply and assign /= Divide and assign %= Find remainder and assign **= Find exponential and assign 01 Arithmetic Operators 02 Assignment Operators 03 Comparison Operators 04 Logical Operators 05 Bitwise Operators 06 Identity Operators 07 Membership Operators
  • 35. Operators Used to compare values www.edureka.co/python Operator Description == Compare if true != Compare if not true < Check if less than > Check if greater than <= Check if lesser or equal to >= Check if greater or equal to 01 Arithmetic Operators 02 Assignment Operators 03 Comparison Operators 04 Logical Operators 05 Bitwise Operators 06 Identity Operators 07 Membership Operators
  • 36. Operators Used to obtain logic from the operands www.edureka.co/python Operator Description and True if both are true or True if either is true not Gives the opposite 01 Arithmetic Operators 02 Assignment Operators 03 Comparison Operators 04 Logical Operators 05 Bitwise Operators 06 Identity Operators 07 Membership Operators
  • 37. Operators Used to manipulate the bits of the value directly. www.edureka.co/python Operator Description & Bitwise AND | Bitwise OR ^ Bitwise XOR ~ Give 1’s Complement << Perform left shift >> Perform right shift 01 Arithmetic Operators 02 Assignment Operators 03 Comparison Operators 04 Logical Operators 05 Bitwise Operators 06 Identity Operators 07 Membership Operators
  • 38. Operators Check whether values are identical or not www.edureka.co/python Operator Description is If identical, then true is not If not identical, then true 01 Arithmetic Operators 02 Assignment Operators 03 Comparison Operators 04 Logical Operators 05 Bitwise Operators 06 Identity Operators 07 Membership Operators
  • 39. Operators www.edureka.co/python Check whether a value exists or not Operator Description in True if element exists not in True if element not present 01 Arithmetic Operators 02 Assignment Operators 03 Comparison Operators 04 Logical Operators 05 Bitwise Operators 06 Identity Operators 07 Membership Operators
  • 41. Flow Control Parts of the code where the sequence must alter, flow control comes to the rescue www.edureka.co/python Loops Conditional Statements Flow Control If-else while for
  • 42. Conditional Statements • Conditional statements in Python are if-else statements • This is a simple if-else ladder • if-else can be within other if-else conditions called as nested conditions www.edureka.co/python
  • 43. Loops Loops are used when we want to execute a certain set of statements for different inputs several times www.edureka.co/python Statement Initialization Condition Increment /Decrement False True START END Statement Condition False True START END For Loop While Loop
  • 45. Functions in Python • Functions are blocks of code which are run whenever called • Functions reduce redundancy and increase readability • Python supports pass by object Function Built-in Function User Defined Function www.edureka.co/python
  • 47. File Handling Python provides methods to handle files where we can read and write data into it Steps: • Open a file • Perform operations • Close file You need to make sure that you close the file to avoid damaging data in the file open ( filename, mode ) write( ) close( ) read( ) File Operations in Python Opening a file Reading a file Writing a file Closing a file www.edureka.co/python
  • 49. What is Python? Features of Python Who uses Python? Starting off with Python Data Types in Python Operators in Python Summary www.edureka.co/python
  • 50. Summary www.edureka.co/python Flow Control Function Built-in Function User Defined Function Functions File Handling in Python Function Built-in Function User Defined Function