SlideShare a Scribd company logo
1 of 32
Tushar Mittal
@techytushar
Introduction To Python3
Agenda
➢ What is Python
➢ Why Python
➢ Installation
➢ Basic Syntax :
• Hello World !
• Numbers
• Strings
• Loops
• Conditional Statement
• List
• Dictionaries
• Tuples
• Functions
➢ Summary
➢ Q/A
Python
● High Level Programming Language for general
purpose programming
● Created by Guido Van Rossum
● Release in 1991
● Interpreted not Compiled
● Open Source
Guido Van Rossum
● Author of Python
● University of Amsterdam
-MA in Computer Science
● Google (2005 – 2012)
● Dropbox (2012-Present)
“ I was looking for a "hobby" programming project that would keep
me occupied during the week around Christmas. My office ... would
be closed, but I had a home computer, and not much else on my
hands. I decided to write an interpreter for the new scripting
language.. ”
Why was Python Named Python?
“ I needed a short, simple,
unique and slightly mysterious
name, so I decided to call it
Python.”
Why Python?
● Easy to Learn
● Simple Syntax
● Write Less. Do More.
● Code Readability
● Versatile and Flexible
Advantages
Possibilities
● Machine Learning
● Computer Vision
● Web Development
● Game Development
● Web Scraping
● Desktop Applications
● Automation.....
Machine Learning
● Chatbots
● Speech Recognition
● Anti Virus
● Cancer Detection
● Predicting Stock Prices
● Weather Forecast
● Humanoid Robots
Computer Vision
● Self Driving Cars
● Image Recognition
● Gesture Recognition
● Robots
● Image Enhancement
Web Development
● Instagram
● Youtube
● Pinterest
● NASA
● The Washington Post
● Mozilla
Game Development
Web Scraping
● News Scraping
● Price Comparison
● Reviews
● Monitoring
Desktop Application
Tkinter PyQt
Browser Automation
Job Trends
Popularity
Installation
www.python.org
Installation
Talk is Cheap, Show me the Code
- Linus Torvalds
Basic Syntax
Hello World!
>>> print(“Hello World !”)
#include<stdio.h>
void main()
{
printf(“Hello World !”);
}
public class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello, World");
}
}
Numbers
>>> a = 5
>>> type(a)
<class 'int'>
>>> (-7 + 2) * (10)
-50
>>> (2 ** 4)/4
4
>>> a = 5.0
>>> type(a)
<class ‘float’>
>>> 4/0
ZeroDivisionError: division by zero
Strings
>>> s = ‘Hello I am learning Python.’
>>> s
‘Hello I am learning Python.’
>>> s = “This is a n Multiline String.”
>>> s
‘This is a n Multiline String.’
>>> print(s)
This is a
Multiline String.
>>> s = “”” This is another way of
declaring multiline
string.”””
>>> s
This is another way of n declaring multiline n string.
String Opeartions
>>> s = “your name”
>>> s.title()
‘Your Name’
>>> s.upper()
‘YOUR NAME’
>>> s.lower()
‘your name’
>>> s.swapcase()
‘YOUR NAME’
>>> s + “ is awesome.”
‘your name is awesome.’
Loops
>>> for i in range(1,10):
print(i)
1....9
>>> i = 1
>>> while(i<10):
print(i)
i += 1
1....9
>>> for i in range(1,10,2):
print(i)
1 3 5 7 9
Conditional Statement
>>> a = 1
>>> if (a==1):
print(“Number is 1”)
Elif (a==2):
print(“Number is 2”)
Elif (a==3):
print(“Number is 3”)
Else:
print(“Wrong number.”)
Number is 1
List
>>> list = [1,4,3,2,7,6,5]
>>> print(list)
[1, 4, 3, 2, 7, 6, 5]
>>> print(list[1])
4
>>> list[1] = list[1] + 10
>>> list
[1, 14, 3, 2, 7, 6, 5]
>>> list = list + [20,10]
[1, 14, 3, 2, 7, 6, 5, 20, 10]
>>> for i in list:
print(i)
>>> 20 in list
True
( Upgraded version of Array )
List Operations
>>> list.sort()
>>> print(list)
[1, 2, 3, 5, 6, 7, 10, 14, 20]
>>> list.reverse()
[20, 14, 10, 7, 6, 5, 3, 2, 1]
>>> list.pop(0)
[14, 10, 7, 6, 5, 3, 2, 1]
>>> list.insert(2,’abc’)
[14, 10, ’abc’, 7, 6, 5, 3, 2, 1]
>>> list.append(‘xyz’)
[14, 10, ’abc’, 7, 6, 5, 3, 2, 1, ‘xyz’]
>>> len(l)
10
Dictionary ( Stores Key:Value Pairs )
>>> marks = {‘ram’:80, ’shyam’:90, ‘aditi’:85, ‘abhi’:88}
>>> marks[‘ram’]
80
>>> marks[‘abhi’] = 95
{'ram': 80, 'aditi': 85, 'shyam': 90, 'abhi': 95}
>>> marks[‘aman’] = 60
{'ram': 80, 'aman': 60, 'aditi': 85, 'shyam': 90, 'abhi': 99}
>>> for i in marks:
print(i,marks[i])
>>> ‘abhi’ in marks
True
Tuples ( Immutable data separated by comma )
>>> tup = ('this', 'is' , 'python' , 'workshop')
>>> tup
('this', 'is' , 'python' , 'workshop')
>>> for x in tup:
print(x)
>>> tuple(list)
Functions
>>> def func(a,b,c):
... sum = a+b+c
... return sum
>>> print(func(2,4,6))
#factorial using recursion
>>> def fact(n):
... if n == 0:
... return 1
... return n* fact(n-1)
>>> print(fact(5))
120
Q/A Time
Keep Coding!
Keep Innovating!
Thank You
:)

More Related Content

What's hot

(Fun clojure)
(Fun clojure)(Fun clojure)
(Fun clojure)Timo Sulg
 
Alex Troush - IEx Cheat Sheet. Guide to Win with IEx on your Day to Day Job
Alex Troush - IEx Cheat Sheet. Guide to Win with IEx on your Day to Day JobAlex Troush - IEx Cheat Sheet. Guide to Win with IEx on your Day to Day Job
Alex Troush - IEx Cheat Sheet. Guide to Win with IEx on your Day to Day JobElixir Club
 
More Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By VishnuMore Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By VishnuKanchilug
 
Yurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLYurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLElixir Club
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosEdgar Suarez
 
Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Elixir Club
 
10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-pythonDaniel Greenfeld
 
Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Yuriko IKEDA
 
201705 metaprogramming in julia
201705 metaprogramming in julia201705 metaprogramming in julia
201705 metaprogramming in julia岳華 杜
 
MongoDB shell games: Here be dragons .. and JavaScript!
MongoDB shell games: Here be dragons .. and JavaScript!MongoDB shell games: Here be dragons .. and JavaScript!
MongoDB shell games: Here be dragons .. and JavaScript!Stennie Steneker
 
Importing wikipedia in Plone
Importing wikipedia in PloneImporting wikipedia in Plone
Importing wikipedia in PloneMakina Corpus
 
Naughty And Nice Bash Features
Naughty And Nice Bash FeaturesNaughty And Nice Bash Features
Naughty And Nice Bash FeaturesNati Cohen
 
Software Dendrology by Brandon Bloom
Software Dendrology by Brandon BloomSoftware Dendrology by Brandon Bloom
Software Dendrology by Brandon BloomHakka Labs
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito
 

What's hot (19)

Linux basic3
Linux basic3Linux basic3
Linux basic3
 
2 × 3 = 6
2 × 3 = 62 × 3 = 6
2 × 3 = 6
 
(Fun clojure)
(Fun clojure)(Fun clojure)
(Fun clojure)
 
Grails In The Wild
Grails In The WildGrails In The Wild
Grails In The Wild
 
Alex Troush - IEx Cheat Sheet. Guide to Win with IEx on your Day to Day Job
Alex Troush - IEx Cheat Sheet. Guide to Win with IEx on your Day to Day JobAlex Troush - IEx Cheat Sheet. Guide to Win with IEx on your Day to Day Job
Alex Troush - IEx Cheat Sheet. Guide to Win with IEx on your Day to Day Job
 
More Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By VishnuMore Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By Vishnu
 
Yurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLYurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSL
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutos
 
Git installation
Git installationGit installation
Git installation
 
Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet
 
Topic
TopicTopic
Topic
 
10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python
 
Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境
 
201705 metaprogramming in julia
201705 metaprogramming in julia201705 metaprogramming in julia
201705 metaprogramming in julia
 
MongoDB shell games: Here be dragons .. and JavaScript!
MongoDB shell games: Here be dragons .. and JavaScript!MongoDB shell games: Here be dragons .. and JavaScript!
MongoDB shell games: Here be dragons .. and JavaScript!
 
Importing wikipedia in Plone
Importing wikipedia in PloneImporting wikipedia in Plone
Importing wikipedia in Plone
 
Naughty And Nice Bash Features
Naughty And Nice Bash FeaturesNaughty And Nice Bash Features
Naughty And Nice Bash Features
 
Software Dendrology by Brandon Bloom
Software Dendrology by Brandon BloomSoftware Dendrology by Brandon Bloom
Software Dendrology by Brandon Bloom
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
 

Similar to Introduction to Python3 Programming Language

Hands on Session on Python
Hands on Session on PythonHands on Session on Python
Hands on Session on PythonSumit Raj
 
An Intro to Python in 30 minutes
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutesSumit Raj
 
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
 
python-an-introduction
python-an-introductionpython-an-introduction
python-an-introductionShrinivasan T
 
Python-The programming Language
Python-The programming LanguagePython-The programming Language
Python-The programming LanguageRohan Gupta
 
Python bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of NairobiPython bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of Nairobikrmboya
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdfgmadhu8
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPTShivam Gupta
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to pythonActiveState
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In PythonMarwan Osman
 
Python update in 2018 #ll2018jp
Python update in 2018 #ll2018jpPython update in 2018 #ll2018jp
Python update in 2018 #ll2018jpcocodrips
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonAhmed Salama
 
Python and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementPython and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementLaurent Leturgez
 

Similar to Introduction to Python3 Programming Language (20)

Hands on Session on Python
Hands on Session on PythonHands on Session on Python
Hands on Session on Python
 
Python slide
Python slidePython slide
Python slide
 
An Intro to Python in 30 minutes
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutes
 
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...
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
python-an-introduction
python-an-introductionpython-an-introduction
python-an-introduction
 
Intro
IntroIntro
Intro
 
Python-The programming Language
Python-The programming LanguagePython-The programming Language
Python-The programming Language
 
Python bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of NairobiPython bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of Nairobi
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
 
Python
PythonPython
Python
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
 
Python update in 2018 #ll2018jp
Python update in 2018 #ll2018jpPython update in 2018 #ll2018jp
Python update in 2018 #ll2018jp
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementPython and Oracle : allies for best of data management
Python and Oracle : allies for best of data management
 
Python: The Dynamic!
Python: The Dynamic!Python: The Dynamic!
Python: The Dynamic!
 
Initial Java Core Concept
Initial Java Core ConceptInitial Java Core Concept
Initial Java Core Concept
 
Eugene goostman the bot
Eugene goostman the botEugene goostman the bot
Eugene goostman the bot
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

Introduction to Python3 Programming Language

  • 2. Agenda ➢ What is Python ➢ Why Python ➢ Installation ➢ Basic Syntax : • Hello World ! • Numbers • Strings • Loops • Conditional Statement • List • Dictionaries • Tuples • Functions ➢ Summary ➢ Q/A
  • 3.
  • 4. Python ● High Level Programming Language for general purpose programming ● Created by Guido Van Rossum ● Release in 1991 ● Interpreted not Compiled ● Open Source
  • 5. Guido Van Rossum ● Author of Python ● University of Amsterdam -MA in Computer Science ● Google (2005 – 2012) ● Dropbox (2012-Present) “ I was looking for a "hobby" programming project that would keep me occupied during the week around Christmas. My office ... would be closed, but I had a home computer, and not much else on my hands. I decided to write an interpreter for the new scripting language.. ”
  • 6. Why was Python Named Python? “ I needed a short, simple, unique and slightly mysterious name, so I decided to call it Python.”
  • 8. ● Easy to Learn ● Simple Syntax ● Write Less. Do More. ● Code Readability ● Versatile and Flexible Advantages
  • 9. Possibilities ● Machine Learning ● Computer Vision ● Web Development ● Game Development ● Web Scraping ● Desktop Applications ● Automation.....
  • 10. Machine Learning ● Chatbots ● Speech Recognition ● Anti Virus ● Cancer Detection ● Predicting Stock Prices ● Weather Forecast ● Humanoid Robots
  • 11. Computer Vision ● Self Driving Cars ● Image Recognition ● Gesture Recognition ● Robots ● Image Enhancement
  • 12. Web Development ● Instagram ● Youtube ● Pinterest ● NASA ● The Washington Post ● Mozilla
  • 14. Web Scraping ● News Scraping ● Price Comparison ● Reviews ● Monitoring
  • 20. Talk is Cheap, Show me the Code - Linus Torvalds Basic Syntax
  • 21. Hello World! >>> print(“Hello World !”) #include<stdio.h> void main() { printf(“Hello World !”); } public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } }
  • 22. Numbers >>> a = 5 >>> type(a) <class 'int'> >>> (-7 + 2) * (10) -50 >>> (2 ** 4)/4 4 >>> a = 5.0 >>> type(a) <class ‘float’> >>> 4/0 ZeroDivisionError: division by zero
  • 23. Strings >>> s = ‘Hello I am learning Python.’ >>> s ‘Hello I am learning Python.’ >>> s = “This is a n Multiline String.” >>> s ‘This is a n Multiline String.’ >>> print(s) This is a Multiline String. >>> s = “”” This is another way of declaring multiline string.””” >>> s This is another way of n declaring multiline n string.
  • 24. String Opeartions >>> s = “your name” >>> s.title() ‘Your Name’ >>> s.upper() ‘YOUR NAME’ >>> s.lower() ‘your name’ >>> s.swapcase() ‘YOUR NAME’ >>> s + “ is awesome.” ‘your name is awesome.’
  • 25. Loops >>> for i in range(1,10): print(i) 1....9 >>> i = 1 >>> while(i<10): print(i) i += 1 1....9 >>> for i in range(1,10,2): print(i) 1 3 5 7 9
  • 26. Conditional Statement >>> a = 1 >>> if (a==1): print(“Number is 1”) Elif (a==2): print(“Number is 2”) Elif (a==3): print(“Number is 3”) Else: print(“Wrong number.”) Number is 1
  • 27. List >>> list = [1,4,3,2,7,6,5] >>> print(list) [1, 4, 3, 2, 7, 6, 5] >>> print(list[1]) 4 >>> list[1] = list[1] + 10 >>> list [1, 14, 3, 2, 7, 6, 5] >>> list = list + [20,10] [1, 14, 3, 2, 7, 6, 5, 20, 10] >>> for i in list: print(i) >>> 20 in list True ( Upgraded version of Array )
  • 28. List Operations >>> list.sort() >>> print(list) [1, 2, 3, 5, 6, 7, 10, 14, 20] >>> list.reverse() [20, 14, 10, 7, 6, 5, 3, 2, 1] >>> list.pop(0) [14, 10, 7, 6, 5, 3, 2, 1] >>> list.insert(2,’abc’) [14, 10, ’abc’, 7, 6, 5, 3, 2, 1] >>> list.append(‘xyz’) [14, 10, ’abc’, 7, 6, 5, 3, 2, 1, ‘xyz’] >>> len(l) 10
  • 29. Dictionary ( Stores Key:Value Pairs ) >>> marks = {‘ram’:80, ’shyam’:90, ‘aditi’:85, ‘abhi’:88} >>> marks[‘ram’] 80 >>> marks[‘abhi’] = 95 {'ram': 80, 'aditi': 85, 'shyam': 90, 'abhi': 95} >>> marks[‘aman’] = 60 {'ram': 80, 'aman': 60, 'aditi': 85, 'shyam': 90, 'abhi': 99} >>> for i in marks: print(i,marks[i]) >>> ‘abhi’ in marks True
  • 30. Tuples ( Immutable data separated by comma ) >>> tup = ('this', 'is' , 'python' , 'workshop') >>> tup ('this', 'is' , 'python' , 'workshop') >>> for x in tup: print(x) >>> tuple(list)
  • 31. Functions >>> def func(a,b,c): ... sum = a+b+c ... return sum >>> print(func(2,4,6)) #factorial using recursion >>> def fact(n): ... if n == 0: ... return 1 ... return n* fact(n-1) >>> print(fact(5)) 120
  • 32. Q/A Time Keep Coding! Keep Innovating! Thank You :)