SlideShare a Scribd company logo
I
N
TR
O
D
U
CTI
O
N T
OP
Y
T
H
O
N
P
R
O
G
R
A
M
M
I
N
G
Google (Youtube)
Facebook (Tornado)
Dropbox
Yahoo
NASA
IBM
Mozilla
Quora
Instagram (Django)
Reddit
Search algorithms
Log analysis
Google Data Python Client Library
Google APIs Client Library for Python
Google AdWords API Python Client Library
Machine Learning
Robotics projects
Introduction to Python Programming
NAME IS BASED ON A BBC
COMEDY SERIES FROM THE 1970S
Monty Python's Flying Circus
Guido van Ro s s u m
December 1989
Python is used across domains such as:
Scripting
Testing
Web Development
IoT Programming
Data Science
Programming is error-prone!
Programming errors are called bugs
The process of tracking them down is called debugging
Easy-to-learn:
Python has few keywords, a simple structure, and a clearly defined syntax.
Easy-to-read:
Python code is more clearly defined and visible to the eyes.
Easy-to-maintain:
Python's source code is fairly easy to maintain.
A broad standard library:
Python's bulk of the library is very portable and cross-platform compatible on
UNIX, Windows, and Macintosh.
Interactive Mode:
Python has support for an interactive mode that allows interactive testing and
debugging of snippets of code.
Portable:
Python can run on a wide variety of hardware platforms and has the same
interface on all platforms.
Extendable:
You can add low-level modules to the Python interpreter. These modules
enable programmers to add to or customize their tools to be more efficient.
Databases:
Python provides interfaces to all major commercial databases.
GUI Programming:
Python supports GUI applications that can be created and ported to many
system calls, libraries, and windows systems, such as Windows MFC,
Macintosh, and the X Window system of Unix.
Scalable:
Python provides a better structure and support for large programs than shell
scripting.
Portability:
A property of a program that can run on more than one kind of
computer.
Interpret:
To execute a program in a high-level language by translating it one
line at a time.
Compile:
To translate a program written in a high-level language into a low-level
language all at once, in preparation for later execution.
Introduction to Python Programming
Introduction to Python Programming
A program is a sequence of instructions that specifies how to
perform a computation.
Input: Get data from the keyboard, a file, or some other device.
Output: Display data on the screen or send data to a file or other
device.
Process:
1.Math: Perform basic mathematical operations like addition
and multiplication.
2.Conditional execution: Check for certain conditions andexecute
the appropriate code.
3.Repetition: Perform some action repeatedly, usually with some
variation.
Introduction to Python Programming
Introduction to Python Programming
HTTPS://REPO.ANACONDA.COM/ARCHIVE/
Num bers
1.int (signed integers):
They are often called just integers or int, are positive or negative whole numbers
with no decimal point.
2. long (long integers ):
Also called long, they are integers of unlimited size, written like integers and
followed by an uppercase or lowercaseL.
3. float (floating point real values):
Also called floats, they represent real numbers and are written with a decimal
point dividing the integer and fractional parts. Floats may also be in scientific
notation, with Eor e indicating the power of 10 (2.5e2 = 2.5 x 102= 250).
4. complex (complex numbers):
Are of the form a + bJ, where a and b are floats and J (or j) represents the square
root of -1 (which is an imaginary number). The real part of the number is a, and the
imaginary part is b.
1.Variables are reserved memory locations that are used to store values and
are referenced by a name.
Example: Assigning a contact number and referencing it by a contact name
2.Syntax to define a variable is asfollows:
variableName = value
Example: phoneNumber = 12345
Variable name should start with an alphabet orunderscore (‘_’) followed
by any number of alphabets, digits andunderscores
Variable names are case sensitive.
Example: phoneNumber is different from PhoneNumber and phonenumber
Variable name cannot be a reserved name
Example: print, if, for, etc
Variable name cannot contain any special character other thanunderscore
Int
Float
Boolean
String
List , List comprehension
Tuple
Dictionary
Syntax error
Semantic Error
Runtime Error
While loop – syntax-while(condition):
For loop – syntax – for i in range(0,n):
A collection of built-in modules, each providing different functionality
beyond what is included in the corePython.
import math
math.sqrt(16)
math.factorial(10)
These are called as fruitful functions in python.
Functions are created to make calculations easy toreuse
The general form of a function call is <<function_name>>(<<arguments>>)
An argument is an expression that appears between the parenthesis of a
function call.
The number within parenthesis in the below function call is argument.
abs(-10)
abs(-10.5)
abs(10.5)
Rules to execute a function call:
Evaluate each argument one at a time, working from left to right.
Pass the resulting values into the function.
Executes the function.
The result is obtained.
abs(-7) + abs (3)
pow(abs(-2), round(3.2))
X = input(“Enter an expression:”)
Multiple assignments are also possible
Ex: x,y = 3,4
x,y = map(int, input().split())
def f1():
•print(‘Inside the function’)
f1()
def f1(number):
•print(number)
F1(5)
def add():
print(“Enter 2 numbers to add:”)
a =int(input(“1st number:”))
b =int(input(“2nd number:”))
return(a+b)
result = add()
print(‘After addition:’ result)
num=int(input("Enter the number"))
fact=1
for i in range (1,num+1):
fact=fact*i
print(fact)
def fact(num):
fact=1
for i in range (1,num+1):
fact=fact*i
print(fact)
return fact
num=int(input("Enter the number"))
fact(num)
def fact(num):
if(num==1):
return(1
)
else:
return num*fact(num-1)
num=int(input("Enter the number"))
print(fact(num))
Strings are a collection of characters. They are enclosed in
single or double-quotes.
Eg: ‘Climate is pleasant’
‘1234’
‘#@$’
Operators overloading are available in default.
3*’a’ = ‘aaa’
‘a’+’a’ = ‘aa’
‘a’ +3 will give synatax error (you cannot add a string anda number)
‘a’ +‘3’ = ‘a3’
‘a’*’a’ will give a syntax error.
Indexing is used to extract individual characters from astring
Indexing in python starts from 0.
S =‘welcome’
S[0] = ‘w’
S[1]=‘e’ ….
Slicing is taking subsets from a string.
Lower limit is inclusive where as Upper limit isexclusive.
S=‘welcome’
S[0:2] ??
S[0:] ??
S[:3] ??
S[:] ???
S[0:4]??
‘a’ in ‘ssn’
‘ss’ in ‘ssn’
Replacing a string:
Text =‘Python is easy’
Text =Text.replace(‘easy’ , ‘easy and powerful’)
Explore the other functions -Assignment
Write a python function to find the max of 3 numbers
Check whether a number is palindrome using function
Check whether a string is palindrome using function
Write a Python function that accepts a string and calculatethe
number of upper case letters and lower case letters

More Related Content

What's hot (20)

Operator overloading
Operator overloadingOperator overloading
Operator overloading
Pranali Chaudhari
 
Function C programming
Function C programmingFunction C programming
Function C programming
Appili Vamsi Krishna
 
Inheritance
InheritanceInheritance
Inheritance
Tech_MX
 
Modern c++ Memory Management
Modern c++ Memory ManagementModern c++ Memory Management
Modern c++ Memory Management
Alan Uthoff
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
Sachin Sharma
 
Memory allocation in c
Memory allocation in cMemory allocation in c
Memory allocation in c
Muhammed Thanveer M
 
String C Programming
String C ProgrammingString C Programming
String C Programming
Prionto Abdullah
 
Java Practice Set
Java Practice SetJava Practice Set
Java Practice Set
Gaurav Dixit
 
Diccionario De Datos
Diccionario De DatosDiccionario De Datos
Diccionario De Datos
Universidad Veracruzana
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
Jasleen Kaur (Chandigarh University)
 
Let us c chapter 4 solution
Let us c chapter 4 solutionLet us c chapter 4 solution
Let us c chapter 4 solution
rohit kumar
 
Getters_And_Setters.pptx
Getters_And_Setters.pptxGetters_And_Setters.pptx
Getters_And_Setters.pptx
Kavindu Sachinthe
 
Function in c program
Function in c programFunction in c program
Function in c program
umesh patil
 
Python unit 3 m.sc cs
Python unit 3 m.sc csPython unit 3 m.sc cs
Python unit 3 m.sc cs
KALAISELVI P
 
C Programming Storage classes, Recursion
C Programming Storage classes, RecursionC Programming Storage classes, Recursion
C Programming Storage classes, Recursion
Sreedhar Chowdam
 
Storage classes
Storage classesStorage classes
Storage classes
Leela Koneru
 
Intro to c++
Intro to c++Intro to c++
Intro to c++
temkin abdlkader
 
C++
C++C++
C++
VishalMishra313
 
POINTERS IN C MRS.SOWMYA JYOTHI.pdf
POINTERS IN C MRS.SOWMYA JYOTHI.pdfPOINTERS IN C MRS.SOWMYA JYOTHI.pdf
POINTERS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
Java package
Java packageJava package
Java package
Arati Gadgil
 

Similar to Introduction to Python Programming (20)

Introduction to Python Programming | InsideAIML
Introduction to Python Programming | InsideAIMLIntroduction to Python Programming | InsideAIML
Introduction to Python Programming | InsideAIML
VijaySharma802
 
Python Programming Introduction demo.ppt
Python Programming Introduction demo.pptPython Programming Introduction demo.ppt
Python Programming Introduction demo.ppt
JohariNawab
 
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
PART - 1  Python Introduction- Variables- Data types - Numeric- String- Boole...PART - 1  Python Introduction- Variables- Data types - Numeric- String- Boole...
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
manikamr074
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
RojaPriya
 
Python
PythonPython
Python
Gagandeep Nanda
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
kavinilavuG
 
PPt Revision of the basics of python1.pptx
PPt Revision of the basics of python1.pptxPPt Revision of the basics of python1.pptx
PPt Revision of the basics of python1.pptx
tcsonline1222
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
DRVaibhavmeshram1
 
Keep it Stupidly Simple Introduce Python
Keep it Stupidly Simple Introduce PythonKeep it Stupidly Simple Introduce Python
Keep it Stupidly Simple Introduce Python
SushJalai
 
Sessisgytcfgggggggggggggggggggggggggggggggg
SessisgytcfggggggggggggggggggggggggggggggggSessisgytcfgggggggggggggggggggggggggggggggg
Sessisgytcfgggggggggggggggggggggggggggggggg
pawankamal3
 
CPPDS Slide.pdf
CPPDS Slide.pdfCPPDS Slide.pdf
CPPDS Slide.pdf
Fadlie Ahdon
 
Python-01| Fundamentals
Python-01| FundamentalsPython-01| Fundamentals
Python-01| Fundamentals
Mohd Sajjad
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
Anonymous9etQKwW
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
vikram mahendra
 
Chapter1 python introduction syntax general
Chapter1 python introduction syntax generalChapter1 python introduction syntax general
Chapter1 python introduction syntax general
ssuser77162c
 
Python knowledge ,......................
Python knowledge ,......................Python knowledge ,......................
Python knowledge ,......................
sabith777a
 
Data Structure and Algorithms (DSA) with Python
Data Structure and Algorithms (DSA) with PythonData Structure and Algorithms (DSA) with Python
Data Structure and Algorithms (DSA) with Python
epsilonice
 
Introduction to learn and Python Interpreter
Introduction to learn and Python InterpreterIntroduction to learn and Python Interpreter
Introduction to learn and Python Interpreter
Alamelu
 
Unit 1 c - all topics
Unit 1   c - all topicsUnit 1   c - all topics
Unit 1 c - all topics
veningstonk
 
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfpython-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
KosmikTech1
 
Introduction to Python Programming | InsideAIML
Introduction to Python Programming | InsideAIMLIntroduction to Python Programming | InsideAIML
Introduction to Python Programming | InsideAIML
VijaySharma802
 
Python Programming Introduction demo.ppt
Python Programming Introduction demo.pptPython Programming Introduction demo.ppt
Python Programming Introduction demo.ppt
JohariNawab
 
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
PART - 1  Python Introduction- Variables- Data types - Numeric- String- Boole...PART - 1  Python Introduction- Variables- Data types - Numeric- String- Boole...
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
manikamr074
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
RojaPriya
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
kavinilavuG
 
PPt Revision of the basics of python1.pptx
PPt Revision of the basics of python1.pptxPPt Revision of the basics of python1.pptx
PPt Revision of the basics of python1.pptx
tcsonline1222
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
DRVaibhavmeshram1
 
Keep it Stupidly Simple Introduce Python
Keep it Stupidly Simple Introduce PythonKeep it Stupidly Simple Introduce Python
Keep it Stupidly Simple Introduce Python
SushJalai
 
Sessisgytcfgggggggggggggggggggggggggggggggg
SessisgytcfggggggggggggggggggggggggggggggggSessisgytcfgggggggggggggggggggggggggggggggg
Sessisgytcfgggggggggggggggggggggggggggggggg
pawankamal3
 
Python-01| Fundamentals
Python-01| FundamentalsPython-01| Fundamentals
Python-01| Fundamentals
Mohd Sajjad
 
Chapter1 python introduction syntax general
Chapter1 python introduction syntax generalChapter1 python introduction syntax general
Chapter1 python introduction syntax general
ssuser77162c
 
Python knowledge ,......................
Python knowledge ,......................Python knowledge ,......................
Python knowledge ,......................
sabith777a
 
Data Structure and Algorithms (DSA) with Python
Data Structure and Algorithms (DSA) with PythonData Structure and Algorithms (DSA) with Python
Data Structure and Algorithms (DSA) with Python
epsilonice
 
Introduction to learn and Python Interpreter
Introduction to learn and Python InterpreterIntroduction to learn and Python Interpreter
Introduction to learn and Python Interpreter
Alamelu
 
Unit 1 c - all topics
Unit 1   c - all topicsUnit 1   c - all topics
Unit 1 c - all topics
veningstonk
 
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfpython-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
KosmikTech1
 
Ad

More from VijaySharma802 (7)

Different Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIMLDifferent Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIML
VijaySharma802
 
Data Science with Python Lesson 1 - InsideAIML
Data Science with Python Lesson 1 - InsideAIMLData Science with Python Lesson 1 - InsideAIML
Data Science with Python Lesson 1 - InsideAIML
VijaySharma802
 
Data Science with Python Course - InsideAIML
Data Science with Python Course - InsideAIMLData Science with Python Course - InsideAIML
Data Science with Python Course - InsideAIML
VijaySharma802
 
Evolution of Machine Learning - InsideAIML
Evolution of Machine Learning - InsideAIMLEvolution of Machine Learning - InsideAIML
Evolution of Machine Learning - InsideAIML
VijaySharma802
 
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIMLAn In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
VijaySharma802
 
Meta Pseudo Label - InsideAIML
Meta Pseudo Label - InsideAIMLMeta Pseudo Label - InsideAIML
Meta Pseudo Label - InsideAIML
VijaySharma802
 
Ten trends of IoT in 2020 - InsideAIML
Ten trends of IoT in 2020 - InsideAIMLTen trends of IoT in 2020 - InsideAIML
Ten trends of IoT in 2020 - InsideAIML
VijaySharma802
 
Different Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIMLDifferent Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIML
VijaySharma802
 
Data Science with Python Lesson 1 - InsideAIML
Data Science with Python Lesson 1 - InsideAIMLData Science with Python Lesson 1 - InsideAIML
Data Science with Python Lesson 1 - InsideAIML
VijaySharma802
 
Data Science with Python Course - InsideAIML
Data Science with Python Course - InsideAIMLData Science with Python Course - InsideAIML
Data Science with Python Course - InsideAIML
VijaySharma802
 
Evolution of Machine Learning - InsideAIML
Evolution of Machine Learning - InsideAIMLEvolution of Machine Learning - InsideAIML
Evolution of Machine Learning - InsideAIML
VijaySharma802
 
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIMLAn In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
An In-Depth Explanation of Recurrent Neural Networks (RNNs) - InsideAIML
VijaySharma802
 
Meta Pseudo Label - InsideAIML
Meta Pseudo Label - InsideAIMLMeta Pseudo Label - InsideAIML
Meta Pseudo Label - InsideAIML
VijaySharma802
 
Ten trends of IoT in 2020 - InsideAIML
Ten trends of IoT in 2020 - InsideAIMLTen trends of IoT in 2020 - InsideAIML
Ten trends of IoT in 2020 - InsideAIML
VijaySharma802
 
Ad

Recently uploaded (20)

LDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-inLDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-in
LDM & Mia eStudios
 
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGYHUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
DHARMENDRA SAHU
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
Uterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managmentUterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managment
Ritu480198
 
How to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRMHow to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRM
Celine George
 
Smart Borrowing: Everything You Need to Know About Short Term Loans in India
Smart Borrowing: Everything You Need to Know About Short Term Loans in IndiaSmart Borrowing: Everything You Need to Know About Short Term Loans in India
Smart Borrowing: Everything You Need to Know About Short Term Loans in India
fincrifcontent
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website SuccessSearch Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptxColeoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based EducatorDiana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
Semisolid_Dosage_Forms.pptx
Semisolid_Dosage_Forms.pptxSemisolid_Dosage_Forms.pptx
Semisolid_Dosage_Forms.pptx
Shantanu Ranjan
 
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
Quiz Club of PSG College of Arts & Science
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
POS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 SlidesPOS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 Slides
Celine George
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Pharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptxPharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptx
Shantanu Ranjan
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
LDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-inLDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-in
LDM & Mia eStudios
 
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGYHUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
HUMAN SKELETAL SYSTEM ANATAMY AND PHYSIOLOGY
DHARMENDRA SAHU
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
Uterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managmentUterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managment
Ritu480198
 
How to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRMHow to Create a Stage or a Pipeline in Odoo 18 CRM
How to Create a Stage or a Pipeline in Odoo 18 CRM
Celine George
 
Smart Borrowing: Everything You Need to Know About Short Term Loans in India
Smart Borrowing: Everything You Need to Know About Short Term Loans in IndiaSmart Borrowing: Everything You Need to Know About Short Term Loans in India
Smart Borrowing: Everything You Need to Know About Short Term Loans in India
fincrifcontent
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website SuccessSearch Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptxColeoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based EducatorDiana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
Semisolid_Dosage_Forms.pptx
Semisolid_Dosage_Forms.pptxSemisolid_Dosage_Forms.pptx
Semisolid_Dosage_Forms.pptx
Shantanu Ranjan
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
POS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 SlidesPOS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 Slides
Celine George
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Pharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptxPharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptx
Shantanu Ranjan
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 

Introduction to Python Programming

  • 3. Search algorithms Log analysis Google Data Python Client Library Google APIs Client Library for Python Google AdWords API Python Client Library Machine Learning Robotics projects
  • 5. NAME IS BASED ON A BBC COMEDY SERIES FROM THE 1970S Monty Python's Flying Circus Guido van Ro s s u m December 1989
  • 6. Python is used across domains such as: Scripting Testing Web Development IoT Programming Data Science
  • 7. Programming is error-prone! Programming errors are called bugs The process of tracking them down is called debugging
  • 8. Easy-to-learn: Python has few keywords, a simple structure, and a clearly defined syntax. Easy-to-read: Python code is more clearly defined and visible to the eyes. Easy-to-maintain: Python's source code is fairly easy to maintain. A broad standard library: Python's bulk of the library is very portable and cross-platform compatible on UNIX, Windows, and Macintosh. Interactive Mode: Python has support for an interactive mode that allows interactive testing and debugging of snippets of code. Portable: Python can run on a wide variety of hardware platforms and has the same interface on all platforms.
  • 9. Extendable: You can add low-level modules to the Python interpreter. These modules enable programmers to add to or customize their tools to be more efficient. Databases: Python provides interfaces to all major commercial databases. GUI Programming: Python supports GUI applications that can be created and ported to many system calls, libraries, and windows systems, such as Windows MFC, Macintosh, and the X Window system of Unix. Scalable: Python provides a better structure and support for large programs than shell scripting.
  • 10. Portability: A property of a program that can run on more than one kind of computer. Interpret: To execute a program in a high-level language by translating it one line at a time. Compile: To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution.
  • 13. A program is a sequence of instructions that specifies how to perform a computation. Input: Get data from the keyboard, a file, or some other device. Output: Display data on the screen or send data to a file or other device. Process: 1.Math: Perform basic mathematical operations like addition and multiplication. 2.Conditional execution: Check for certain conditions andexecute the appropriate code. 3.Repetition: Perform some action repeatedly, usually with some variation.
  • 17. Num bers 1.int (signed integers): They are often called just integers or int, are positive or negative whole numbers with no decimal point. 2. long (long integers ): Also called long, they are integers of unlimited size, written like integers and followed by an uppercase or lowercaseL. 3. float (floating point real values): Also called floats, they represent real numbers and are written with a decimal point dividing the integer and fractional parts. Floats may also be in scientific notation, with Eor e indicating the power of 10 (2.5e2 = 2.5 x 102= 250). 4. complex (complex numbers): Are of the form a + bJ, where a and b are floats and J (or j) represents the square root of -1 (which is an imaginary number). The real part of the number is a, and the imaginary part is b.
  • 18. 1.Variables are reserved memory locations that are used to store values and are referenced by a name. Example: Assigning a contact number and referencing it by a contact name 2.Syntax to define a variable is asfollows: variableName = value Example: phoneNumber = 12345
  • 19. Variable name should start with an alphabet orunderscore (‘_’) followed by any number of alphabets, digits andunderscores Variable names are case sensitive. Example: phoneNumber is different from PhoneNumber and phonenumber Variable name cannot be a reserved name Example: print, if, for, etc Variable name cannot contain any special character other thanunderscore
  • 21. List , List comprehension Tuple Dictionary
  • 23. While loop – syntax-while(condition): For loop – syntax – for i in range(0,n):
  • 24. A collection of built-in modules, each providing different functionality beyond what is included in the corePython. import math math.sqrt(16) math.factorial(10) These are called as fruitful functions in python.
  • 25. Functions are created to make calculations easy toreuse The general form of a function call is <<function_name>>(<<arguments>>) An argument is an expression that appears between the parenthesis of a function call. The number within parenthesis in the below function call is argument.
  • 27. Rules to execute a function call: Evaluate each argument one at a time, working from left to right. Pass the resulting values into the function. Executes the function. The result is obtained. abs(-7) + abs (3) pow(abs(-2), round(3.2))
  • 28. X = input(“Enter an expression:”) Multiple assignments are also possible Ex: x,y = 3,4 x,y = map(int, input().split())
  • 29. def f1(): •print(‘Inside the function’) f1()
  • 31. def add(): print(“Enter 2 numbers to add:”) a =int(input(“1st number:”)) b =int(input(“2nd number:”)) return(a+b) result = add() print(‘After addition:’ result)
  • 32. num=int(input("Enter the number")) fact=1 for i in range (1,num+1): fact=fact*i print(fact)
  • 33. def fact(num): fact=1 for i in range (1,num+1): fact=fact*i print(fact) return fact num=int(input("Enter the number")) fact(num)
  • 35. Strings are a collection of characters. They are enclosed in single or double-quotes. Eg: ‘Climate is pleasant’ ‘1234’ ‘#@$’
  • 36. Operators overloading are available in default. 3*’a’ = ‘aaa’ ‘a’+’a’ = ‘aa’ ‘a’ +3 will give synatax error (you cannot add a string anda number) ‘a’ +‘3’ = ‘a3’ ‘a’*’a’ will give a syntax error.
  • 37. Indexing is used to extract individual characters from astring Indexing in python starts from 0. S =‘welcome’ S[0] = ‘w’ S[1]=‘e’ ….
  • 38. Slicing is taking subsets from a string. Lower limit is inclusive where as Upper limit isexclusive. S=‘welcome’ S[0:2] ?? S[0:] ?? S[:3] ?? S[:] ??? S[0:4]??
  • 39. ‘a’ in ‘ssn’ ‘ss’ in ‘ssn’ Replacing a string: Text =‘Python is easy’ Text =Text.replace(‘easy’ , ‘easy and powerful’)
  • 40. Explore the other functions -Assignment
  • 41. Write a python function to find the max of 3 numbers Check whether a number is palindrome using function Check whether a string is palindrome using function
  • 42. Write a Python function that accepts a string and calculatethe number of upper case letters and lower case letters