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 Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
Python
PythonPython
Python
 
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

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
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
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
“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
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
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)

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
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 🔝✔️✔️
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.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...
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
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🔝
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
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 :)