SlideShare a Scribd company logo
1 of 44
PYTHON FOR BEGINNERS
Introduction
 Python is a general purpose, high level programming
language that is often applied in scripting roles.
 so, python is programming language as well as
scripting language.
 Python is also called interpreted language.
9 March 2019Python
History
 Invented in Netherlands, early 90s by Guido van
Rossum
 Python was conceived in the late 1980s and its
implementation was started in December 1989
 Guido van Rossum is fan of ‘Monty Python’s Flying
Circus’, this is a famous TV show in Netherlands
 Named after Monty Python
 Open sourced from beginning
9 March 2019Python
Scope of Python
 Desktop application
 Web application
 Games
 Scientific application
 Artificial Intelligence (A.I.)
 Machine Learning (M.L)
 Data Science
 IoT (Internet of Things)
9 March 2019Python
What can I do with Python?
• System programming
• Graphical User Interface Programming
• Internet Scripting
• Component integration
• Database Programming
• Gaming, Images, XML, Robot and more
9 March 2019Python
Who uses Python TODAY…
• Python is being applied in real revenue-generating
products by real companies. For instance:
• Google is one of the Python users that included this
language in its web search system and employed Python’s
creator, too.
• YouTube video sharing service makes extensive use of
Python.
• ESRI uses Python as an end-user customization tool for its
popular GIS mapping products.
• iRobot uses Python to develop commercial robotic vacuum
cleaners.
• Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and
IBM use Python for hardware testing.
9 March 2019Python
Features of Python
 Interpreted
 You run the program straight from the source code.
 Python program Bytecode a platforms native language
 You can just copy over your code to another system and it will
auto-magically work! *with python platform
 Object-Oriented
 Simple and additionally supports procedural programming
 Extensible – easily import other code
 Easy to read- Code is more clearly defined.
 Extensive libraries
 (i.e. reg. expressions, doc generation, CGI, ftp, web browsers,
ZIP, WAV, cryptography, etc...) (wxPython, Twisted, Python
Imaging library)
9 March 2019Python
Why do people use Python…?
 The following primary factors cited by Python
users seem to be these:
Python is object-oriented
 Structure supports such concepts as
polymorphism,operation overloading, and multiple
inheritance.
It's free (open source)
 Downloading and installing Python is free and
easy
 Source code is easily accessible.
9 March 2019Python
Python on your systems
 Its easy! Go to http://www.python.org/download/
 Download your architecture binary, or source
 Install, make, build whatever you need to do…
plenty of info on installation in readmes
 Make your first program! (a simple on like the hello
world one will do just fine)
 Two ways of running python code. Either in an
interpreter or in a file ran as an executable
Python
Starting IDLE on Windows
 Start IDLE
 Go to File menu and click on New Window
 Type your program in
 Go to File menu and click on Save. Type
in filename.py This will save it as a plain text
file, which can be opened in in any editor
you choose (like Notepad).
 To run your program go to Run and
click Run Module.
9 March 2019Python
Starting IDLE on Windows
9 March 2019Python
Python Shell
9 March 2019Python
How to open new file ?
9 March 2019Python
New file
9 March 2019Python
Continued…
9 March 2019Python
Continued…
9 March 2019Python
Continued…
9 March 2019Python
Continued…
9 March 2019Python
Python Code Execution
Source code you type is translated to byte code:
 Python Virtual Machine. Your code is automatically
compiled, but then it is interpreted.
 Source code extension is .py
 Byte code extension is .pyc (compiled python code)
9 March 2019Python
Basic Syntax of Python
 A Python identifier is a name used to identify a variable, function,
class, module or other object. An identifier starts with a letter A to Z
or a to z or an underscore (_) followed by zero or more letters,
underscores and digits (0 to 9).
 Python does not allow punctuation characters such as @, $, and
% within identifiers. Python is a case sensitive programming
language.
 Python provides no braces to indicate blocks of code for class and
function definitions or flow control. Blocks of code are denoted by
line indentation, which is rigidly enforced.
9 March 2019Python
Continued…
 Python accepts single ('), double (") and triple (''' or """) quotes to
denote string literals, as long as the same type of quote starts and
ends the string.
 A hash sign (#) that is not inside a string literal begins a comment.
9 March 2019Python
Standard Data types
 String – ‘MyString’, and “MyString”
 List – [ 69, 6.9, ‘mystring’, True]
 Tuple – (69, 6.9, ‘mystring’, True) immutable
 Set/frozenset – set([69, 6.9, ‘str’, True])
frozenset- ([69, 6.9, ‘str’, True]) –no duplicates &
unordered
 Dictionary or hash – {‘key 1’: 6.9, ‘key2’: False} -
group of key and value pairs
9 March 2019Python
Strings
 Strings in Python are identified as a contiguous set of
characters represented in the quotation marks.
Python allows for either pairs of single or double
quotes. Subsets of strings can be taken using the
slice operator ([ ] and [:] ) with indexes starting at 0 in
the beginning of the string and working their way from
-1 at the end.
 The plus (+) sign is the string concatenation operator
and the asterisk (*) is the repetition operator.
9 March 2019Python
Strings
9 March 2019Python
Lists
 lists are the most versatile of Python's compound data
types. A list contains items separated by commas and
enclosed within square brackets ([ ]). To some extent, lists
are similar to arrays in C. One difference between them is
that all the items belonging to a list can be of different data
type.
 The values stored in a list can be accessed using the slice
operator ([ ] and [:]) with indexes starting at 0 in the
beginning of the list and working their way to end -1. The
plus (+) sign is the list concatenation operator, and the
asterisk (*) is the repetition operator.
9 March 2019Python
Continued…
9 March 2019Python
Operators
There are various operators in Python
1. Arithmetic Operators
2. Relational Operators
3. Conditional Operators
4. Logical Operators
5. Bitwise Operators
6. Assignment Operators
7. Special operators
9 March 2019Python
Operators In Python
9 March 2019Python
CONDITIONAL STATEMENT
9 March 2019
Sr.No. Statement & Description
1. if statements An if statement consists of a boolean
expression followed by one or more statements.
2. if...else statements An if statement can be followed by an
optional else statement, which executes when the boolean
expression is FALSE.
3. nested if statements You can use one if or else if statement
inside another if or else if statement(s).
Continued…
9 March 2019Python
Loops
 A loop statement allows us to
execute a statement or group of
statements multiple times.
 Types of Loops:-
• While loop
• Do-while loop
• For loop
9 March 2019Python
Loops/ Iterations
9 March 2019Python
Functions
 A function is a block of organized, reusable
code that is used to perform a single, related
action. Functions provide better modularity
for your application and a high degree of
code reusing.
 As you already know, Python gives you
many built-in functions like print(), etc. but
you can also create your own functions.
These functions are called user-defined
functions.
9 March 2019Python
Defining a function
 You can define functions to provide the required
functionality. Here are simple rules to define a function in
Python.
 Function blocks begin with the keyword def followed by the
function name and parentheses ( ( ) ).
 Any input parameters or arguments should be placed within
these parentheses. You can also define parameters inside
these parentheses.
 The code block within every function starts with a colon (:)
and is indented.
 The statement return [expression] exits a function,
optionally passing back an expression to the caller. A return
statement with no arguments is the same as return None.
9 March 2019Python
Continued…
9 March 2019Python
Function with Description
1. cmp(list1, list2) Compares elements of both
lists.
2. len(list) Gives the total length of the list.
3. max(list) Returns item from the list with max
value.
4. min(list) Returns item from the list with min
value.
5. list(seq) Converts a tuple into list.
9 March 2019Python
Modules
 Modules refer to a file containing Python statements and
definitions.
 A file containing Python code, for e.g.: example.py is a module
and its module name would be example.
 We use modules to break down large programs into small
manageable and organized files. Furthermore, modules provide
reusability of code.
 We can define our most used functions in a module and import it,
instead of copying their definitions into different programs.
 Let us create a module. Type the following and save it as
example.py
9 March 2019Python
Import Statement
The properties of one module we can use into another
module by using 'import ' statement.
Python support two type of import statement
1. Normal import
2. From import
Normal import
In normal import entire python file or module object is
imported.
Whenever we import a module by using normal import we
can access the properties of that module by using that
module.
9 March 2019
How to import modules in Python?
9 March 2019Python
Continued...
From import
By using from import we can import the required
properties of module
 Module search path
• Cwd
• Environment variables
• Installation dependent directories
 if module is not found then we will get error
9 March 2019Python
Continued…
9 March 2019Python
1. Performance wise not up to the mark
because it is a interpreted
language.
2. Not using for mobile Application.
Limitations of Python
Software used
 Pycharm
 Python IDLE 3.7
 Pandas
 Anacondas
 Numpy
 Scpy
9 March 2019Python
9 March 2019Python

More Related Content

What's hot

Chapter 1 Basic Programming (Python Programming Lecture)
Chapter 1 Basic Programming (Python Programming Lecture)Chapter 1 Basic Programming (Python Programming Lecture)
Chapter 1 Basic Programming (Python Programming Lecture)IoT Code Lab
 
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...Maulik Borsaniya
 
Python intro ch_e_comp
Python intro ch_e_compPython intro ch_e_comp
Python intro ch_e_compPaulo Castro
 
Python 培训讲义
Python 培训讲义Python 培训讲义
Python 培训讲义leejd
 
Python interview questions
Python interview questionsPython interview questions
Python interview questionsPragati Singh
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Chariza Pladin
 
Intro to Functions Python
Intro to Functions PythonIntro to Functions Python
Intro to Functions Pythonprimeteacher32
 
Go programming introduction
Go programming introductionGo programming introduction
Go programming introductionGinto Joseph
 
Natural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usageNatural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usagehyunyoung Lee
 

What's hot (20)

C Programming Homework Help
C Programming Homework HelpC Programming Homework Help
C Programming Homework Help
 
Chapter 1 Basic Programming (Python Programming Lecture)
Chapter 1 Basic Programming (Python Programming Lecture)Chapter 1 Basic Programming (Python Programming Lecture)
Chapter 1 Basic Programming (Python Programming Lecture)
 
Python basic
Python basicPython basic
Python basic
 
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
 
Python intro ch_e_comp
Python intro ch_e_compPython intro ch_e_comp
Python intro ch_e_comp
 
Python Basics
Python Basics Python Basics
Python Basics
 
Python ppt
Python pptPython ppt
Python ppt
 
Python 培训讲义
Python 培训讲义Python 培训讲义
Python 培训讲义
 
python.ppt
python.pptpython.ppt
python.ppt
 
Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
 
Python advance
Python advancePython advance
Python advance
 
Python interview questions
Python interview questionsPython interview questions
Python interview questions
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3
 
Intro to Functions Python
Intro to Functions PythonIntro to Functions Python
Intro to Functions Python
 
Go programming introduction
Go programming introductionGo programming introduction
Go programming introduction
 
Python for loop
Python for loopPython for loop
Python for loop
 
Natural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usageNatural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usage
 
C pythontalk
C pythontalkC pythontalk
C pythontalk
 
NumPy
NumPyNumPy
NumPy
 
Python Homework Help
Python Homework HelpPython Homework Help
Python Homework Help
 

Similar to PYTHON FOR BEGINNERS (BASICS OF PYTHON)

Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019Samir Mohanty
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data sciencebhavesh lande
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1Kirti Verma
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An IntroductionSwarit Wadhe
 
Python Programmimg language in Gurugram
Python  Programmimg language in GurugramPython  Programmimg language in Gurugram
Python Programmimg language in Gurugramdigitallynikitasharm
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of pythonBijuAugustian
 
python ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institutepython ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network InstituteScode Network Institute
 
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptxa9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptxcigogag569
 
What is Python.pptx
What is Python.pptxWhat is Python.pptx
What is Python.pptxMalluKomar
 
Python and its applications
Python and its applicationsPython and its applications
Python and its applicationsmohakmishra97
 

Similar to PYTHON FOR BEGINNERS (BASICS OF PYTHON) (20)

Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
 
Chapter - 1.pptx
Chapter - 1.pptxChapter - 1.pptx
Chapter - 1.pptx
 
Python programming
Python programmingPython programming
Python programming
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data science
 
python-handbook.pdf
python-handbook.pdfpython-handbook.pdf
python-handbook.pdf
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1
 
Core python programming tutorial
Core python programming tutorialCore python programming tutorial
Core python programming tutorial
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Python Programmimg language in Gurugram
Python  Programmimg language in GurugramPython  Programmimg language in Gurugram
Python Programmimg language in Gurugram
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
 
python ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institutepython ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institute
 
Python unit1
Python unit1Python unit1
Python unit1
 
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptxa9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
 
Summer Training Project.pdf
Summer Training Project.pdfSummer Training Project.pdf
Summer Training Project.pdf
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
What is Python.pptx
What is Python.pptxWhat is Python.pptx
What is Python.pptx
 
Python and its applications
Python and its applicationsPython and its applications
Python and its applications
 

More from HemaArora2

UNIT 4 SPM (DCRUST)
UNIT 4 SPM (DCRUST)UNIT 4 SPM (DCRUST)
UNIT 4 SPM (DCRUST)HemaArora2
 
Spm previous year papers
Spm previous year papersSpm previous year papers
Spm previous year papersHemaArora2
 
WT(WEB TECHNOLOGY) previous year question papers
WT(WEB TECHNOLOGY) previous year question papersWT(WEB TECHNOLOGY) previous year question papers
WT(WEB TECHNOLOGY) previous year question papersHemaArora2
 
class 10 CBSE Chapter 5 Periodic classification of elements previous year imp...
class 10 CBSE Chapter 5 Periodic classification of elements previous year imp...class 10 CBSE Chapter 5 Periodic classification of elements previous year imp...
class 10 CBSE Chapter 5 Periodic classification of elements previous year imp...HemaArora2
 
Class 10 CBSE (Metals and non metals) chapter 3 previous year important quest...
Class 10 CBSE (Metals and non metals) chapter 3 previous year important quest...Class 10 CBSE (Metals and non metals) chapter 3 previous year important quest...
Class 10 CBSE (Metals and non metals) chapter 3 previous year important quest...HemaArora2
 
class 10 CBSE Chapter 2 Acids bases and salts important previous year questions
class 10 CBSE Chapter 2 Acids bases and salts important previous year questionsclass 10 CBSE Chapter 2 Acids bases and salts important previous year questions
class 10 CBSE Chapter 2 Acids bases and salts important previous year questionsHemaArora2
 
UNIT 4 Software Testing Notes (Topic Wise)
UNIT 4 Software Testing Notes (Topic Wise)UNIT 4 Software Testing Notes (Topic Wise)
UNIT 4 Software Testing Notes (Topic Wise)HemaArora2
 
UNIT 3 Software Testing Notes (TOPIC WISE)
UNIT 3 Software Testing Notes (TOPIC WISE)UNIT 3 Software Testing Notes (TOPIC WISE)
UNIT 3 Software Testing Notes (TOPIC WISE)HemaArora2
 
UNIT 2 Software Testing (Topic Wise)
UNIT 2 Software Testing (Topic Wise)UNIT 2 Software Testing (Topic Wise)
UNIT 2 Software Testing (Topic Wise)HemaArora2
 
Unit 1 Software Testing (HANDWRITTEN+PRINTED NOTES)
Unit 1 Software Testing (HANDWRITTEN+PRINTED NOTES)Unit 1 Software Testing (HANDWRITTEN+PRINTED NOTES)
Unit 1 Software Testing (HANDWRITTEN+PRINTED NOTES)HemaArora2
 
UNIT 2 SPM (DCRUST)
UNIT 2 SPM (DCRUST)UNIT 2 SPM (DCRUST)
UNIT 2 SPM (DCRUST)HemaArora2
 
UNIT 1 SPM (DCRUST)
UNIT 1 SPM (DCRUST)UNIT 1 SPM (DCRUST)
UNIT 1 SPM (DCRUST)HemaArora2
 

More from HemaArora2 (13)

UNIT 4 SPM (DCRUST)
UNIT 4 SPM (DCRUST)UNIT 4 SPM (DCRUST)
UNIT 4 SPM (DCRUST)
 
UNIT 3 SPM
UNIT 3 SPMUNIT 3 SPM
UNIT 3 SPM
 
Spm previous year papers
Spm previous year papersSpm previous year papers
Spm previous year papers
 
WT(WEB TECHNOLOGY) previous year question papers
WT(WEB TECHNOLOGY) previous year question papersWT(WEB TECHNOLOGY) previous year question papers
WT(WEB TECHNOLOGY) previous year question papers
 
class 10 CBSE Chapter 5 Periodic classification of elements previous year imp...
class 10 CBSE Chapter 5 Periodic classification of elements previous year imp...class 10 CBSE Chapter 5 Periodic classification of elements previous year imp...
class 10 CBSE Chapter 5 Periodic classification of elements previous year imp...
 
Class 10 CBSE (Metals and non metals) chapter 3 previous year important quest...
Class 10 CBSE (Metals and non metals) chapter 3 previous year important quest...Class 10 CBSE (Metals and non metals) chapter 3 previous year important quest...
Class 10 CBSE (Metals and non metals) chapter 3 previous year important quest...
 
class 10 CBSE Chapter 2 Acids bases and salts important previous year questions
class 10 CBSE Chapter 2 Acids bases and salts important previous year questionsclass 10 CBSE Chapter 2 Acids bases and salts important previous year questions
class 10 CBSE Chapter 2 Acids bases and salts important previous year questions
 
UNIT 4 Software Testing Notes (Topic Wise)
UNIT 4 Software Testing Notes (Topic Wise)UNIT 4 Software Testing Notes (Topic Wise)
UNIT 4 Software Testing Notes (Topic Wise)
 
UNIT 3 Software Testing Notes (TOPIC WISE)
UNIT 3 Software Testing Notes (TOPIC WISE)UNIT 3 Software Testing Notes (TOPIC WISE)
UNIT 3 Software Testing Notes (TOPIC WISE)
 
UNIT 2 Software Testing (Topic Wise)
UNIT 2 Software Testing (Topic Wise)UNIT 2 Software Testing (Topic Wise)
UNIT 2 Software Testing (Topic Wise)
 
Unit 1 Software Testing (HANDWRITTEN+PRINTED NOTES)
Unit 1 Software Testing (HANDWRITTEN+PRINTED NOTES)Unit 1 Software Testing (HANDWRITTEN+PRINTED NOTES)
Unit 1 Software Testing (HANDWRITTEN+PRINTED NOTES)
 
UNIT 2 SPM (DCRUST)
UNIT 2 SPM (DCRUST)UNIT 2 SPM (DCRUST)
UNIT 2 SPM (DCRUST)
 
UNIT 1 SPM (DCRUST)
UNIT 1 SPM (DCRUST)UNIT 1 SPM (DCRUST)
UNIT 1 SPM (DCRUST)
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 

PYTHON FOR BEGINNERS (BASICS OF PYTHON)

  • 2. Introduction  Python is a general purpose, high level programming language that is often applied in scripting roles.  so, python is programming language as well as scripting language.  Python is also called interpreted language. 9 March 2019Python
  • 3. History  Invented in Netherlands, early 90s by Guido van Rossum  Python was conceived in the late 1980s and its implementation was started in December 1989  Guido van Rossum is fan of ‘Monty Python’s Flying Circus’, this is a famous TV show in Netherlands  Named after Monty Python  Open sourced from beginning 9 March 2019Python
  • 4. Scope of Python  Desktop application  Web application  Games  Scientific application  Artificial Intelligence (A.I.)  Machine Learning (M.L)  Data Science  IoT (Internet of Things) 9 March 2019Python
  • 5. What can I do with Python? • System programming • Graphical User Interface Programming • Internet Scripting • Component integration • Database Programming • Gaming, Images, XML, Robot and more 9 March 2019Python
  • 6. Who uses Python TODAY… • Python is being applied in real revenue-generating products by real companies. For instance: • Google is one of the Python users that included this language in its web search system and employed Python’s creator, too. • YouTube video sharing service makes extensive use of Python. • ESRI uses Python as an end-user customization tool for its popular GIS mapping products. • iRobot uses Python to develop commercial robotic vacuum cleaners. • Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM use Python for hardware testing. 9 March 2019Python
  • 7. Features of Python  Interpreted  You run the program straight from the source code.  Python program Bytecode a platforms native language  You can just copy over your code to another system and it will auto-magically work! *with python platform  Object-Oriented  Simple and additionally supports procedural programming  Extensible – easily import other code  Easy to read- Code is more clearly defined.  Extensive libraries  (i.e. reg. expressions, doc generation, CGI, ftp, web browsers, ZIP, WAV, cryptography, etc...) (wxPython, Twisted, Python Imaging library) 9 March 2019Python
  • 8. Why do people use Python…?  The following primary factors cited by Python users seem to be these: Python is object-oriented  Structure supports such concepts as polymorphism,operation overloading, and multiple inheritance. It's free (open source)  Downloading and installing Python is free and easy  Source code is easily accessible. 9 March 2019Python
  • 9. Python on your systems  Its easy! Go to http://www.python.org/download/  Download your architecture binary, or source  Install, make, build whatever you need to do… plenty of info on installation in readmes  Make your first program! (a simple on like the hello world one will do just fine)  Two ways of running python code. Either in an interpreter or in a file ran as an executable Python
  • 10. Starting IDLE on Windows  Start IDLE  Go to File menu and click on New Window  Type your program in  Go to File menu and click on Save. Type in filename.py This will save it as a plain text file, which can be opened in in any editor you choose (like Notepad).  To run your program go to Run and click Run Module. 9 March 2019Python
  • 11. Starting IDLE on Windows 9 March 2019Python
  • 12. Python Shell 9 March 2019Python
  • 13. How to open new file ? 9 March 2019Python
  • 14. New file 9 March 2019Python
  • 19. Python Code Execution Source code you type is translated to byte code:  Python Virtual Machine. Your code is automatically compiled, but then it is interpreted.  Source code extension is .py  Byte code extension is .pyc (compiled python code) 9 March 2019Python
  • 20. Basic Syntax of Python  A Python identifier is a name used to identify a variable, function, class, module or other object. An identifier starts with a letter A to Z or a to z or an underscore (_) followed by zero or more letters, underscores and digits (0 to 9).  Python does not allow punctuation characters such as @, $, and % within identifiers. Python is a case sensitive programming language.  Python provides no braces to indicate blocks of code for class and function definitions or flow control. Blocks of code are denoted by line indentation, which is rigidly enforced. 9 March 2019Python
  • 21. Continued…  Python accepts single ('), double (") and triple (''' or """) quotes to denote string literals, as long as the same type of quote starts and ends the string.  A hash sign (#) that is not inside a string literal begins a comment. 9 March 2019Python
  • 22. Standard Data types  String – ‘MyString’, and “MyString”  List – [ 69, 6.9, ‘mystring’, True]  Tuple – (69, 6.9, ‘mystring’, True) immutable  Set/frozenset – set([69, 6.9, ‘str’, True]) frozenset- ([69, 6.9, ‘str’, True]) –no duplicates & unordered  Dictionary or hash – {‘key 1’: 6.9, ‘key2’: False} - group of key and value pairs 9 March 2019Python
  • 23. Strings  Strings in Python are identified as a contiguous set of characters represented in the quotation marks. Python allows for either pairs of single or double quotes. Subsets of strings can be taken using the slice operator ([ ] and [:] ) with indexes starting at 0 in the beginning of the string and working their way from -1 at the end.  The plus (+) sign is the string concatenation operator and the asterisk (*) is the repetition operator. 9 March 2019Python
  • 25. Lists  lists are the most versatile of Python's compound data types. A list contains items separated by commas and enclosed within square brackets ([ ]). To some extent, lists are similar to arrays in C. One difference between them is that all the items belonging to a list can be of different data type.  The values stored in a list can be accessed using the slice operator ([ ] and [:]) with indexes starting at 0 in the beginning of the list and working their way to end -1. The plus (+) sign is the list concatenation operator, and the asterisk (*) is the repetition operator. 9 March 2019Python
  • 27. Operators There are various operators in Python 1. Arithmetic Operators 2. Relational Operators 3. Conditional Operators 4. Logical Operators 5. Bitwise Operators 6. Assignment Operators 7. Special operators 9 March 2019Python
  • 28. Operators In Python 9 March 2019Python
  • 29. CONDITIONAL STATEMENT 9 March 2019 Sr.No. Statement & Description 1. if statements An if statement consists of a boolean expression followed by one or more statements. 2. if...else statements An if statement can be followed by an optional else statement, which executes when the boolean expression is FALSE. 3. nested if statements You can use one if or else if statement inside another if or else if statement(s).
  • 31. Loops  A loop statement allows us to execute a statement or group of statements multiple times.  Types of Loops:- • While loop • Do-while loop • For loop 9 March 2019Python
  • 33. Functions  A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.  As you already know, Python gives you many built-in functions like print(), etc. but you can also create your own functions. These functions are called user-defined functions. 9 March 2019Python
  • 34. Defining a function  You can define functions to provide the required functionality. Here are simple rules to define a function in Python.  Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ).  Any input parameters or arguments should be placed within these parentheses. You can also define parameters inside these parentheses.  The code block within every function starts with a colon (:) and is indented.  The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None. 9 March 2019Python
  • 36. Function with Description 1. cmp(list1, list2) Compares elements of both lists. 2. len(list) Gives the total length of the list. 3. max(list) Returns item from the list with max value. 4. min(list) Returns item from the list with min value. 5. list(seq) Converts a tuple into list. 9 March 2019Python
  • 37. Modules  Modules refer to a file containing Python statements and definitions.  A file containing Python code, for e.g.: example.py is a module and its module name would be example.  We use modules to break down large programs into small manageable and organized files. Furthermore, modules provide reusability of code.  We can define our most used functions in a module and import it, instead of copying their definitions into different programs.  Let us create a module. Type the following and save it as example.py 9 March 2019Python
  • 38. Import Statement The properties of one module we can use into another module by using 'import ' statement. Python support two type of import statement 1. Normal import 2. From import Normal import In normal import entire python file or module object is imported. Whenever we import a module by using normal import we can access the properties of that module by using that module. 9 March 2019
  • 39. How to import modules in Python? 9 March 2019Python
  • 40. Continued... From import By using from import we can import the required properties of module  Module search path • Cwd • Environment variables • Installation dependent directories  if module is not found then we will get error 9 March 2019Python
  • 42. 1. Performance wise not up to the mark because it is a interpreted language. 2. Not using for mobile Application. Limitations of Python
  • 43. Software used  Pycharm  Python IDLE 3.7  Pandas  Anacondas  Numpy  Scpy 9 March 2019Python