SlideShare a Scribd company logo
1 of 62
Python Certification Training https://www.edureka.co/python
Agenda
Python Certification Training https://www.edureka.co/python
Agenda
Introduction 01
Introduction
to Python
Getting Started 02
Concepts 03
Practical Approach 04
Installing and working
with Python
Looking at code to
understand theory
Overview of the
concepts in Python
Python Certification Training https://www.edureka.co/python
Introduction to Python
Python Certification Training https://www.edureka.co/python
Introduction to Python
Open Source
Python is a powerful high-level, object-oriented programming
language created by Guido van Rossum.
What is Python?
Largest community for
Learners and Collaborators
Let’s get started then!
I created
Python!
No. It wasn't named after a
dangerous snake.
Rossum was fan of a comedy
series from late seventies.
The name "Python" was
adopted from the same
series "Monty Python's
Flying Circus".
Python Certification Training https://www.edureka.co/python
Why is Python so popular?
Python Certification Training https://www.edureka.co/python
Popularity Of Python
Learning other
languages
Learning
Python
Python is very
beginner-friendly!
Hello Python!
Syntax is extremely
simple to read and
follow!
Millions of happy learners!
I’m a happy coder!
Python Certification Training https://www.edureka.co/python
Unique Features of Python
Python Certification Training https://www.edureka.co/python
Features Of Python
0102
03 04
0506
07
Simple language - Easier to learnFree and Open-Source
Portability Extensible and Embeddable
Large Standard Libraries High Level – Interpreted Language
Object Oriented You shall master Python!
Python Certification Training https://www.edureka.co/python
Why should you learn Python?
Python Certification Training https://www.edureka.co/python
Why Should You Learn Python?
Length of the code is relatively short
Python is a general-purpose language
Wide range of applications
Fun to work with!
Web Development Mathematical Computations Graphical User Interface
Python Certification Training https://www.edureka.co/python
4 Reasons to Choose Python
Python Certification Training https://www.edureka.co/python
Reasons to Choose Python as First Language
We can fetch any number of reasons for you!
a = 2
b = 3
sum = a + b
print(sum)
Why? The syntax feels natural.
Simple Elegant Syntax
Programming in Python is fun!
It's easier to understand and write Python code
Python Certification Training https://www.edureka.co/python
Reasons to Choose Python as First Language
We can fetch any number of reasons for you!
No need to define the type of a variable in Python
Also, no semicolon at the end of the statement
Not overly strict
Phew, no more
semicolon!!!
Python enforces you to follow good practices (like proper
indentation)
Python Certification Training https://www.edureka.co/python
Reasons to Choose Python as First Language
We can fetch any number of reasons for you!
Python allows you to write programs having greater
functionality with fewer lines of code
Expressiveness of the language
Woah
Python <3
You will be amazed how much you can do with Python
once you learn the basics
Python Certification Training https://www.edureka.co/python
Python has a large supporting community
Reasons to Choose Python as First Language
We can fetch any number of reasons for you!
Great Community and Support
We have an amazing community with lots of videos, blogs
and course certifications on Python!
Python Certification Training https://www.edureka.co/python
Installing And Running Python
Python Certification Training https://www.edureka.co/python
Installing And Running Python
6 very simple steps to install Python!
Go to the official Python download page on the official site and click Download Python 3.6.0
When the download is completed, double-click the file and follow the instructions to install it.
When Python is installed, a program called IDLE is also installed along with it. It provides
graphical user interface to work with Python.
To create a file in IDLE, go to File > New Window (Shortcut: Ctrl+N)
Write Python code and save (Shortcut: Ctrl+S) with .py file extension
Go to Run > Run module (Shortcut: F5) and you can see the output.
Python Certification Training https://www.edureka.co/python
Development Environments
Python Certification Training https://www.edureka.co/python
Development Environments
There are a lot of environments you can use!
Komodo IDE
Python Certification Training https://www.edureka.co/python
Compiling v/s Interpreting
Python Certification Training https://www.edureka.co/python
Compiling v/s Interpreting
Python is directly interpreted into machine instructions!
compile execute
outputsource code
Hello.java
byte code
Hello.class
interpret
outputsource code
Hello.py
I’m learning Python!
Python Certification Training https://www.edureka.co/python
Basics of Python
Python Certification Training https://www.edureka.co/python
Expressions
Diving into the heart of Python!
I’m learning Python!
Expression: A data value or set of operations to compute a value.
Examples: 1 + 4 * 3
42
Arithmetic operators we will use:
• + - * / addition, subtraction/negation, multiplication, division
• % modulus, a.k.a. remainder
• ** exponentiation
Precedence: Order in which operations are computed.
• * / % ** have a higher precedence than + -
1 + 3 * 4 is 13
• Parentheses can be used to force a certain order of evaluation.
(1 + 3) * 4 is 16
Python Certification Training https://www.edureka.co/python
Math Commands
Python has useful commands for performing calculations!
I’m learning Python!
Command name Description
abs(value) absolute value
ceil(value) rounds up
cos(value) cosine, in radians
floor(value) rounds down
log(value) logarithm, base e
log10(value) logarithm, base 10
max(value1, value2) larger of two values
min(value1, value2) smaller of two values
round(value) nearest whole number
sin(value) sine, in radians
sqrt(value) square root
Constant Description
e 2.7182818...
pi 3.1415926...
Python Certification Training https://www.edureka.co/python
Variables
Variable is a named piece of memory that can store a value!
I’m learning Python!
• Usage:
– Compute an expression's result,
– store that result into a variable,
– and use that variable later in the program.
Assignment statement: Stores a value into a variable.
• Syntax:
name = value
• Examples: x = 5
gpa = 3.14
• A variable that has been given a value can be used in
expressions.
x + 4 is 9
Python Certification Training https://www.edureka.co/python
Basic Datatypes
Many datatypes to choose from in Python!
I’m learning Python!
Integers (default for numbers)
z = 5 / 2 # Answer 2, integer division
Floats
x = 3.456
Strings
Can use “” or ‘’ to specify with “abc” == ‘abc’
Unmatched can occur within the string: “matt’s”
Use triple double-quotes for multi-line strings or strings than contain
both ‘ and “ inside of them:
“““a‘b“c”””
Python Certification Training https://www.edureka.co/python
Whitespaces
Whitespace is meaningful in Python: Especially indentation and placement of newlines
I’m learning Python!
Use a newline to end a line of code
Use  when must go to next line prematurely
No braces {} to mark blocks of code, use consistent indentation instead
•First line with less indentation is outside of the block
•First line with more indentation starts a nested block
Colons start of a new block in many constructs, e.g. function definitions, then
clauses.
Python Certification Training https://www.edureka.co/python
Comments
Comments help us understand the code better!
I’m learning Python!
Start comments with #, rest of line is ignored
Can include a “documentation string” as the first line of a new function or class you define
Development environments, debugger, and other tools use it: it’s good style to include one.
#ImAComment
Python Certification Training https://www.edureka.co/python
Assignment
So how do you put some value in a variable?
I’m learning Python!
Binding a variable in Python means setting a name to hold a reference to some object
Assignment creates references, not copies!
Names in Python do not have an intrinsic type, objects have types
Python determines the type of the reference automatically based on what data
is assigned to it
You create a name the first time it appears on the left side of an assignment
expression:
x = 3
A reference is deleted via garbage collection after any names bound to it have passed
out of scope.
Python uses reference semantics (more later)
Python Certification Training https://www.edureka.co/python
A Quick Break!
Python and it’s big players around the world!
Python Certification Training https://www.edureka.co/python
Naming Rules
Watch out for reserved words!
I’m learning Python!
Names are case sensitive and cannot start with a number. They can contain
letters, numbers, and underscores.
bob Bob _bob _2_bob_ bob_2 BoB
There are some reserved words:
and, assert, break, class, continue, def, del, elif, else, except, exec,
finally, for, from, global, if, import, in, is, lambda, not, or, pass, print,
raise, return, try, while
Python Certification Training https://www.edureka.co/python
Naming Conventions
We have 3 recommended conventions
I’m learning Python!
The Python community has these recommended naming conventions
• joined_lower for functions, methods and, attributes!
• joined_lower or ALL_CAPS for constants!
• StudlyCaps for classes!
Attributes: interface, _internal, __private
Python Certification Training https://www.edureka.co/python
Assignment – An Easier Way?
Less of typing means more of coding!
I’m learning Python!
You can assign to multiple names at the same time
>>> x, y = 2, 3
>>> x
2
>>> y
3
This makes it easy to swap values
>>> x, y = y, x
Assignments can be chained
>>> a = b = x = 2
Python Certification Training https://www.edureka.co/python
Accessing Non-Existent Names
Let’s see how we can raise an error!
I’m learning Python!
Accessing a name before it’s been properly created (by placing
it on the left side of an assignment), raises an error
>>> y
Traceback (most recent call last):
File "<pyshell#16>", line 1, in -toplevel-
y
NameError: name ‘y' is not defined
>>> y = 3
>>> y
3
Python Certification Training https://www.edureka.co/python
Casting
We can explicitly convert based on requirement
I’m learning Python!
Casting in python is therefore done using constructor functions:
•int() - constructs an integer number from an integer literal, a float literal (by
rounding down to the previous whole number), or a string literal (providing the string
represents a whole number)
•float() - constructs a float number from an integer literal, a float literal or a string
literal (providing the string represents a float or an integer)
•str() - constructs a string from a wide variety of data types, including strings, integer
literals and float literals
Python Certification Training https://www.edureka.co/python
Casting
We can explicitly convert based on requirement
I’m learning Python!
x = int(1) # x will be 1
y = int(2.8) # y will be 2
z = int("3") # z will be 3
x = float(1) # x will be 1.0
y = float(2.8) # y will be 2.8
z = float("3") # z will be 3.0
w = float("4.2") # w will be 4.2
x = str("s1") # x will be 's1'
y = str(2) # y will be '2'
z = str(3.0) # z will be '3.0'
Told you
Python is
real easy!
Python Certification Training https://www.edureka.co/python
Let’s Code
Python Certification Training https://www.edureka.co/python
Python Operators
Python Certification Training https://www.edureka.co/python
Arithmetic Operators
We can perform common math operations easily!
I’m learning Python!
Operator Name Example
+ Addition x + y
- Subtraction x – y
* Multiplication x * y
/ Division x / y
* Modulus x % y
** Exponentiation x ** y
// Floor Division x // y
Python Certification Training https://www.edureka.co/python
Assignment Operators
We can assign values to variables easily!
I’m learning Python!
Operator Example Same As
= x = 5 x = 5
+= x += 3 x = x + 3
-= x -= 3 x = x – 3
*= x *= 3 x= x * 3
&= x &= 3 x = x & 3
>>= x >>= 3 x = x >> 3
<<= x <<= 3 x = x <<3
Python Certification Training https://www.edureka.co/python
Comparison Operators
We can compare two values easily!
I’m learning Python!
Operator Name Example
== Equal x == y
!= Not Equal x != y
> Greater Than x > y
< Less Than x < y
>= Greater than or equal to x >= y
<= Less than or equal to x <= y
Python Certification Training https://www.edureka.co/python
Logical Operators
Can we combine conditional statements?
Yes, we can!
I’m learning Python!
Operator Description Example
And
Returns True if both
statements are true
x < 5 and x < 10
Or
Returns True if one of
the statements is true
x < 5 or x < 4
Not
Reverse the result,
returns False if the result
is True
not(x , 5 and x < 10)
Python Certification Training https://www.edureka.co/python
Identity Operators
Compare objects, not to check if they are equal
but to check if they are the same object
I’m learning Python!
Operator Description Example
is
Returns True if both variables
are same object
x is y
is not
Returns True if both variables
are not same object
x is not y
Python Certification Training https://www.edureka.co/python
Bitwise Operators
Let’s compare binary numbers and operate on them!
I’m learning Python!
Operator Name Description
& AND Sets each bit to 1 if both bits are 1
| OR Sets each bit to 1 if one of two bits are 1
^ XOR Sets each bit to 1 if only one of two bits in 1
~ NOT Inverts all the bits
<< Zero fill left shift
Shift left by pushing zeros in from the right and let the
leftmost bits fall off
>> Signed right shift
Shift right by pushing copies of leftmost bit in from the left
and let the rightmost bits fall off
Python Certification Training https://www.edureka.co/python
Python Lists – Back to Code!
Python Certification Training https://www.edureka.co/python
List Methods
Python has a set of built-in methods that you can use!
I’m learning Python!
Method Description
append() Adds an element at the end of the list
clear() Removes all the elements from the list
copy() Returns a copy of the list
count() Returns the number of elements with the specified value
extend() Add the elements of a list to the end of the current list
index() Returns the index of the first element with the specified value
insert() Adds an element at the specified position
pop() Removes the element at the specified position
remove() Removes the item with the specified value
reverse() Reverses the order of the list
sort() Sorts the list
Python Certification Training https://www.edureka.co/python
Python Tuples – Back to Code!
Python Certification Training https://www.edureka.co/python
Tuple Methods
Python has two built-in methods you can use on tuples!
I’m learning Python!
Method Description
count()
Returns the number of times a specified value occurs
in a tuple
index()
Searches the tuple for a specified value and returns
the position of where it was found
Python Certification Training https://www.edureka.co/python
Python Sets – Back to Code!
Python Certification Training https://www.edureka.co/python
Set Methods
Python has two built-in methods you can use on tuples!
I’m learning Python!
Method Description
add() Adds an element to the set
clear() Removes all the elements from the set
copy() Returns a copy of the set
difference()
Returns a set containing the difference between two
or more sets
difference_update()
Removes the items in this set that are also included
in another specified set
discard() Remove the specified item
intersection() Returns the intersection of two other set
issubset() Returns whether another set contains this set or not
pop() Removes an element from the set
Python Certification Training https://www.edureka.co/python
Python Dictionaries – Back to Code!
Python Certification Training https://www.edureka.co/python
Dictionary Methods
Python has a set of built-in methods you can use on dictionaries
I’m learning Python!
Method Description
clear() Removes all the elements from the dictionary
copy() Returns a copy of the dictionary
fromkeys() Returns a dictionary with specified keys and values
get() Returns the value of the specified key
items() Returns a list containing the tuple for each key value pair
keys() Returns a list containing the dictionary's keys
update() Updates the dictionary with specified key-valu pairs
pop() Removes an element from the dictionary
Python Certification Training https://www.edureka.co/python
Condition Statements – More Code!
Python Certification Training https://www.edureka.co/python
Looping In Python – Easy Code!
Python Certification Training https://www.edureka.co/python
Python Functions – Easier Than You Think!
Python Certification Training https://www.edureka.co/python
Arrays – Simple And Straightforward!
Python Certification Training https://www.edureka.co/python
Array Methods
Python has a set of built-in methods you can use on lists/arrays!
I’m learning Python!
Method Description
clear() Removes all the elements from the array
copy() Returns a copy of the array
count() Returns the number of elements with the specified value
insert() Adds an element at the specified position
pop() Removes an element at the specified position
remove() Removes the first item with the specified value
reverse() Reverses the order of the array
sort() Sorts the array
Python Certification Training https://www.edureka.co/python
Classes & Objects – OOP (Code Again!)
Python Certification Training https://www.edureka.co/python
Modules – Last Concept For The Session!
Python Certification Training https://www.edureka.co/python
Conclusion
Python Certification Training https://www.edureka.co/python
Conclusion
Python Tutorial For Beginners | Python Crash Course - Python Programming Language Tutorial | Edureka

More Related Content

What's hot

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!
 
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
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019Samir Mohanty
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaEdureka!
 
Python Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | EdurekaPython Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | EdurekaEdureka!
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on pythonwilliam john
 
Introduction To Python | Edureka
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | EdurekaEdureka!
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAMaulik Borsaniya
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An IntroductionSwarit Wadhe
 
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaEdureka!
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonAgung Wahyudi
 

What's hot (20)

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 - 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
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
 
Introduction to the Python
Introduction to the PythonIntroduction to the Python
Introduction to the Python
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Python Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | EdurekaPython Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | Edureka
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 
Introduction To Python | Edureka
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | Edureka
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Python Basics.pdf
Python Basics.pdfPython Basics.pdf
Python Basics.pdf
 
Python final ppt
Python final pptPython final ppt
Python final ppt
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Python
PythonPython
Python
 
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 

Similar to Python Tutorial For Beginners | Python Crash Course - Python Programming Language Tutorial | Edureka

Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...Edureka!
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to PythonSpotle.ai
 
Python Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PunePython Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PuneEthan's Tech
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & styleKevlin Henney
 
Session-1_Introduction to Python.pptx
Session-1_Introduction to Python.pptxSession-1_Introduction to Python.pptx
Session-1_Introduction to Python.pptxWajidAliHashmi2
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of pythonBijuAugustian
 
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdfCSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdfAbdulmalikAhmadLawan2
 
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...Edureka!
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHBhavsingh Maloth
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonRanjith kumar
 
Introduction-to-Python.pptx
Introduction-to-Python.pptxIntroduction-to-Python.pptx
Introduction-to-Python.pptxAyushDey1
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1Kirti Verma
 
Beginning Python Programmers: Here's Where to Find Help!
Beginning Python Programmers: Here's Where to Find Help!Beginning Python Programmers: Here's Where to Find Help!
Beginning Python Programmers: Here's Where to Find Help!Aleta Dunne
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-introIshaq Ali
 

Similar to Python Tutorial For Beginners | Python Crash Course - Python Programming Language Tutorial | Edureka (20)

Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Python Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PunePython Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech Pune
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & style
 
Session-1_Introduction to Python.pptx
Session-1_Introduction to Python.pptxSession-1_Introduction to Python.pptx
Session-1_Introduction to Python.pptx
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
 
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdfCSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
 
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction-to-Python.pptx
Introduction-to-Python.pptxIntroduction-to-Python.pptx
Introduction-to-Python.pptx
 
Python Intro
Python IntroPython Intro
Python Intro
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1
 
Python basics
Python basicsPython basics
Python basics
 
Beginning Python Programmers: Here's Where to Find Help!
Beginning Python Programmers: Here's Where to Find Help!Beginning Python Programmers: Here's Where to Find Help!
Beginning Python Programmers: Here's Where to Find Help!
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-intro
 

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 | EdurekaEdureka!
 
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 | EdurekaEdureka!
 
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 | EdurekaEdureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaEdureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaEdureka!
 
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 | EdurekaEdureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaEdureka!
 
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| EdurekaEdureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaEdureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | EdurekaEdureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEdureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEdureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaEdureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaEdureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaEdureka!
 
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 | EdurekaEdureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaEdureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | EdurekaEdureka!
 
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 | EdurekaEdureka!
 

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

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Python Tutorial For Beginners | Python Crash Course - Python Programming Language Tutorial | Edureka

  • 1. Python Certification Training https://www.edureka.co/python Agenda
  • 2. Python Certification Training https://www.edureka.co/python Agenda Introduction 01 Introduction to Python Getting Started 02 Concepts 03 Practical Approach 04 Installing and working with Python Looking at code to understand theory Overview of the concepts in Python
  • 3. Python Certification Training https://www.edureka.co/python Introduction to Python
  • 4. Python Certification Training https://www.edureka.co/python Introduction to Python Open Source Python is a powerful high-level, object-oriented programming language created by Guido van Rossum. What is Python? Largest community for Learners and Collaborators Let’s get started then! I created Python! No. It wasn't named after a dangerous snake. Rossum was fan of a comedy series from late seventies. The name "Python" was adopted from the same series "Monty Python's Flying Circus".
  • 5. Python Certification Training https://www.edureka.co/python Why is Python so popular?
  • 6. Python Certification Training https://www.edureka.co/python Popularity Of Python Learning other languages Learning Python Python is very beginner-friendly! Hello Python! Syntax is extremely simple to read and follow! Millions of happy learners! I’m a happy coder!
  • 7. Python Certification Training https://www.edureka.co/python Unique Features of Python
  • 8. Python Certification Training https://www.edureka.co/python Features Of Python 0102 03 04 0506 07 Simple language - Easier to learnFree and Open-Source Portability Extensible and Embeddable Large Standard Libraries High Level – Interpreted Language Object Oriented You shall master Python!
  • 9. Python Certification Training https://www.edureka.co/python Why should you learn Python?
  • 10. Python Certification Training https://www.edureka.co/python Why Should You Learn Python? Length of the code is relatively short Python is a general-purpose language Wide range of applications Fun to work with! Web Development Mathematical Computations Graphical User Interface
  • 11. Python Certification Training https://www.edureka.co/python 4 Reasons to Choose Python
  • 12. Python Certification Training https://www.edureka.co/python Reasons to Choose Python as First Language We can fetch any number of reasons for you! a = 2 b = 3 sum = a + b print(sum) Why? The syntax feels natural. Simple Elegant Syntax Programming in Python is fun! It's easier to understand and write Python code
  • 13. Python Certification Training https://www.edureka.co/python Reasons to Choose Python as First Language We can fetch any number of reasons for you! No need to define the type of a variable in Python Also, no semicolon at the end of the statement Not overly strict Phew, no more semicolon!!! Python enforces you to follow good practices (like proper indentation)
  • 14. Python Certification Training https://www.edureka.co/python Reasons to Choose Python as First Language We can fetch any number of reasons for you! Python allows you to write programs having greater functionality with fewer lines of code Expressiveness of the language Woah Python <3 You will be amazed how much you can do with Python once you learn the basics
  • 15. Python Certification Training https://www.edureka.co/python Python has a large supporting community Reasons to Choose Python as First Language We can fetch any number of reasons for you! Great Community and Support We have an amazing community with lots of videos, blogs and course certifications on Python!
  • 16. Python Certification Training https://www.edureka.co/python Installing And Running Python
  • 17. Python Certification Training https://www.edureka.co/python Installing And Running Python 6 very simple steps to install Python! Go to the official Python download page on the official site and click Download Python 3.6.0 When the download is completed, double-click the file and follow the instructions to install it. When Python is installed, a program called IDLE is also installed along with it. It provides graphical user interface to work with Python. To create a file in IDLE, go to File > New Window (Shortcut: Ctrl+N) Write Python code and save (Shortcut: Ctrl+S) with .py file extension Go to Run > Run module (Shortcut: F5) and you can see the output.
  • 18. Python Certification Training https://www.edureka.co/python Development Environments
  • 19. Python Certification Training https://www.edureka.co/python Development Environments There are a lot of environments you can use! Komodo IDE
  • 20. Python Certification Training https://www.edureka.co/python Compiling v/s Interpreting
  • 21. Python Certification Training https://www.edureka.co/python Compiling v/s Interpreting Python is directly interpreted into machine instructions! compile execute outputsource code Hello.java byte code Hello.class interpret outputsource code Hello.py I’m learning Python!
  • 22. Python Certification Training https://www.edureka.co/python Basics of Python
  • 23. Python Certification Training https://www.edureka.co/python Expressions Diving into the heart of Python! I’m learning Python! Expression: A data value or set of operations to compute a value. Examples: 1 + 4 * 3 42 Arithmetic operators we will use: • + - * / addition, subtraction/negation, multiplication, division • % modulus, a.k.a. remainder • ** exponentiation Precedence: Order in which operations are computed. • * / % ** have a higher precedence than + - 1 + 3 * 4 is 13 • Parentheses can be used to force a certain order of evaluation. (1 + 3) * 4 is 16
  • 24. Python Certification Training https://www.edureka.co/python Math Commands Python has useful commands for performing calculations! I’m learning Python! Command name Description abs(value) absolute value ceil(value) rounds up cos(value) cosine, in radians floor(value) rounds down log(value) logarithm, base e log10(value) logarithm, base 10 max(value1, value2) larger of two values min(value1, value2) smaller of two values round(value) nearest whole number sin(value) sine, in radians sqrt(value) square root Constant Description e 2.7182818... pi 3.1415926...
  • 25. Python Certification Training https://www.edureka.co/python Variables Variable is a named piece of memory that can store a value! I’m learning Python! • Usage: – Compute an expression's result, – store that result into a variable, – and use that variable later in the program. Assignment statement: Stores a value into a variable. • Syntax: name = value • Examples: x = 5 gpa = 3.14 • A variable that has been given a value can be used in expressions. x + 4 is 9
  • 26. Python Certification Training https://www.edureka.co/python Basic Datatypes Many datatypes to choose from in Python! I’m learning Python! Integers (default for numbers) z = 5 / 2 # Answer 2, integer division Floats x = 3.456 Strings Can use “” or ‘’ to specify with “abc” == ‘abc’ Unmatched can occur within the string: “matt’s” Use triple double-quotes for multi-line strings or strings than contain both ‘ and “ inside of them: “““a‘b“c”””
  • 27. Python Certification Training https://www.edureka.co/python Whitespaces Whitespace is meaningful in Python: Especially indentation and placement of newlines I’m learning Python! Use a newline to end a line of code Use when must go to next line prematurely No braces {} to mark blocks of code, use consistent indentation instead •First line with less indentation is outside of the block •First line with more indentation starts a nested block Colons start of a new block in many constructs, e.g. function definitions, then clauses.
  • 28. Python Certification Training https://www.edureka.co/python Comments Comments help us understand the code better! I’m learning Python! Start comments with #, rest of line is ignored Can include a “documentation string” as the first line of a new function or class you define Development environments, debugger, and other tools use it: it’s good style to include one. #ImAComment
  • 29. Python Certification Training https://www.edureka.co/python Assignment So how do you put some value in a variable? I’m learning Python! Binding a variable in Python means setting a name to hold a reference to some object Assignment creates references, not copies! Names in Python do not have an intrinsic type, objects have types Python determines the type of the reference automatically based on what data is assigned to it You create a name the first time it appears on the left side of an assignment expression: x = 3 A reference is deleted via garbage collection after any names bound to it have passed out of scope. Python uses reference semantics (more later)
  • 30. Python Certification Training https://www.edureka.co/python A Quick Break! Python and it’s big players around the world!
  • 31. Python Certification Training https://www.edureka.co/python Naming Rules Watch out for reserved words! I’m learning Python! Names are case sensitive and cannot start with a number. They can contain letters, numbers, and underscores. bob Bob _bob _2_bob_ bob_2 BoB There are some reserved words: and, assert, break, class, continue, def, del, elif, else, except, exec, finally, for, from, global, if, import, in, is, lambda, not, or, pass, print, raise, return, try, while
  • 32. Python Certification Training https://www.edureka.co/python Naming Conventions We have 3 recommended conventions I’m learning Python! The Python community has these recommended naming conventions • joined_lower for functions, methods and, attributes! • joined_lower or ALL_CAPS for constants! • StudlyCaps for classes! Attributes: interface, _internal, __private
  • 33. Python Certification Training https://www.edureka.co/python Assignment – An Easier Way? Less of typing means more of coding! I’m learning Python! You can assign to multiple names at the same time >>> x, y = 2, 3 >>> x 2 >>> y 3 This makes it easy to swap values >>> x, y = y, x Assignments can be chained >>> a = b = x = 2
  • 34. Python Certification Training https://www.edureka.co/python Accessing Non-Existent Names Let’s see how we can raise an error! I’m learning Python! Accessing a name before it’s been properly created (by placing it on the left side of an assignment), raises an error >>> y Traceback (most recent call last): File "<pyshell#16>", line 1, in -toplevel- y NameError: name ‘y' is not defined >>> y = 3 >>> y 3
  • 35. Python Certification Training https://www.edureka.co/python Casting We can explicitly convert based on requirement I’m learning Python! Casting in python is therefore done using constructor functions: •int() - constructs an integer number from an integer literal, a float literal (by rounding down to the previous whole number), or a string literal (providing the string represents a whole number) •float() - constructs a float number from an integer literal, a float literal or a string literal (providing the string represents a float or an integer) •str() - constructs a string from a wide variety of data types, including strings, integer literals and float literals
  • 36. Python Certification Training https://www.edureka.co/python Casting We can explicitly convert based on requirement I’m learning Python! x = int(1) # x will be 1 y = int(2.8) # y will be 2 z = int("3") # z will be 3 x = float(1) # x will be 1.0 y = float(2.8) # y will be 2.8 z = float("3") # z will be 3.0 w = float("4.2") # w will be 4.2 x = str("s1") # x will be 's1' y = str(2) # y will be '2' z = str(3.0) # z will be '3.0' Told you Python is real easy!
  • 37. Python Certification Training https://www.edureka.co/python Let’s Code
  • 38. Python Certification Training https://www.edureka.co/python Python Operators
  • 39. Python Certification Training https://www.edureka.co/python Arithmetic Operators We can perform common math operations easily! I’m learning Python! Operator Name Example + Addition x + y - Subtraction x – y * Multiplication x * y / Division x / y * Modulus x % y ** Exponentiation x ** y // Floor Division x // y
  • 40. Python Certification Training https://www.edureka.co/python Assignment Operators We can assign values to variables easily! I’m learning Python! Operator Example Same As = x = 5 x = 5 += x += 3 x = x + 3 -= x -= 3 x = x – 3 *= x *= 3 x= x * 3 &= x &= 3 x = x & 3 >>= x >>= 3 x = x >> 3 <<= x <<= 3 x = x <<3
  • 41. Python Certification Training https://www.edureka.co/python Comparison Operators We can compare two values easily! I’m learning Python! Operator Name Example == Equal x == y != Not Equal x != y > Greater Than x > y < Less Than x < y >= Greater than or equal to x >= y <= Less than or equal to x <= y
  • 42. Python Certification Training https://www.edureka.co/python Logical Operators Can we combine conditional statements? Yes, we can! I’m learning Python! Operator Description Example And Returns True if both statements are true x < 5 and x < 10 Or Returns True if one of the statements is true x < 5 or x < 4 Not Reverse the result, returns False if the result is True not(x , 5 and x < 10)
  • 43. Python Certification Training https://www.edureka.co/python Identity Operators Compare objects, not to check if they are equal but to check if they are the same object I’m learning Python! Operator Description Example is Returns True if both variables are same object x is y is not Returns True if both variables are not same object x is not y
  • 44. Python Certification Training https://www.edureka.co/python Bitwise Operators Let’s compare binary numbers and operate on them! I’m learning Python! Operator Name Description & AND Sets each bit to 1 if both bits are 1 | OR Sets each bit to 1 if one of two bits are 1 ^ XOR Sets each bit to 1 if only one of two bits in 1 ~ NOT Inverts all the bits << Zero fill left shift Shift left by pushing zeros in from the right and let the leftmost bits fall off >> Signed right shift Shift right by pushing copies of leftmost bit in from the left and let the rightmost bits fall off
  • 45. Python Certification Training https://www.edureka.co/python Python Lists – Back to Code!
  • 46. Python Certification Training https://www.edureka.co/python List Methods Python has a set of built-in methods that you can use! I’m learning Python! Method Description append() Adds an element at the end of the list clear() Removes all the elements from the list copy() Returns a copy of the list count() Returns the number of elements with the specified value extend() Add the elements of a list to the end of the current list index() Returns the index of the first element with the specified value insert() Adds an element at the specified position pop() Removes the element at the specified position remove() Removes the item with the specified value reverse() Reverses the order of the list sort() Sorts the list
  • 47. Python Certification Training https://www.edureka.co/python Python Tuples – Back to Code!
  • 48. Python Certification Training https://www.edureka.co/python Tuple Methods Python has two built-in methods you can use on tuples! I’m learning Python! Method Description count() Returns the number of times a specified value occurs in a tuple index() Searches the tuple for a specified value and returns the position of where it was found
  • 49. Python Certification Training https://www.edureka.co/python Python Sets – Back to Code!
  • 50. Python Certification Training https://www.edureka.co/python Set Methods Python has two built-in methods you can use on tuples! I’m learning Python! Method Description add() Adds an element to the set clear() Removes all the elements from the set copy() Returns a copy of the set difference() Returns a set containing the difference between two or more sets difference_update() Removes the items in this set that are also included in another specified set discard() Remove the specified item intersection() Returns the intersection of two other set issubset() Returns whether another set contains this set or not pop() Removes an element from the set
  • 51. Python Certification Training https://www.edureka.co/python Python Dictionaries – Back to Code!
  • 52. Python Certification Training https://www.edureka.co/python Dictionary Methods Python has a set of built-in methods you can use on dictionaries I’m learning Python! Method Description clear() Removes all the elements from the dictionary copy() Returns a copy of the dictionary fromkeys() Returns a dictionary with specified keys and values get() Returns the value of the specified key items() Returns a list containing the tuple for each key value pair keys() Returns a list containing the dictionary's keys update() Updates the dictionary with specified key-valu pairs pop() Removes an element from the dictionary
  • 53. Python Certification Training https://www.edureka.co/python Condition Statements – More Code!
  • 54. Python Certification Training https://www.edureka.co/python Looping In Python – Easy Code!
  • 55. Python Certification Training https://www.edureka.co/python Python Functions – Easier Than You Think!
  • 56. Python Certification Training https://www.edureka.co/python Arrays – Simple And Straightforward!
  • 57. Python Certification Training https://www.edureka.co/python Array Methods Python has a set of built-in methods you can use on lists/arrays! I’m learning Python! Method Description clear() Removes all the elements from the array copy() Returns a copy of the array count() Returns the number of elements with the specified value insert() Adds an element at the specified position pop() Removes an element at the specified position remove() Removes the first item with the specified value reverse() Reverses the order of the array sort() Sorts the array
  • 58. Python Certification Training https://www.edureka.co/python Classes & Objects – OOP (Code Again!)
  • 59. Python Certification Training https://www.edureka.co/python Modules – Last Concept For The Session!
  • 60. Python Certification Training https://www.edureka.co/python Conclusion
  • 61. Python Certification Training https://www.edureka.co/python Conclusion