SlideShare a Scribd company logo
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
Introduction to Python3 Programming Language
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
:)
Ad

More Related Content

What's hot (19)

Linux basic3
Linux basic3Linux basic3
Linux basic3
Hideo Amezawa
 
2 × 3 = 6
2 × 3 = 62 × 3 = 6
2 × 3 = 6
Tzu-ping Chung
 
(Fun clojure)
(Fun clojure)(Fun clojure)
(Fun clojure)
Timo Sulg
 
Grails In The Wild
Grails In The WildGrails In The Wild
Grails In The Wild
Matthew Taylor
 
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
Elixir 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 Vishnu
Kanchilug
 
Yurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLYurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSL
Elixir Club
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutos
Edgar Suarez
 
Git installation
Git installationGit installation
Git installation
Sitdhibong Laokok
 
Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet Alex Troush - IEx Cheat Sheet
Alex Troush - IEx Cheat Sheet
Elixir Club
 
Topic
TopicTopic
Topic
benhuan
 
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
Daniel 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 Plone
Makina Corpus
 
Naughty And Nice Bash Features
Naughty And Nice Bash FeaturesNaughty And Nice Bash Features
Naughty And Nice Bash Features
Nati Cohen
 
Software Dendrology by Brandon Bloom
Software Dendrology by Brandon BloomSoftware Dendrology by Brandon Bloom
Software Dendrology by Brandon Bloom
Hakka Labs
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
Neoito
 
(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 Job
Elixir 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 Vishnu
Kanchilug
 
Yurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLYurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSL
Elixir Club
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutos
Edgar 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-python
Daniel 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 Plone
Makina Corpus
 
Naughty And Nice Bash Features
Naughty And Nice Bash FeaturesNaughty And Nice Bash Features
Naughty And Nice Bash Features
Nati Cohen
 
Software Dendrology by Brandon Bloom
Software Dendrology by Brandon BloomSoftware Dendrology by Brandon Bloom
Software Dendrology by Brandon Bloom
Hakka Labs
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
Neoito
 

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
Sumit Raj
 
Python slide
Python slidePython slide
Python slide
Kiattisak Anoochitarom
 
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
Sumit 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
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
Daniel Greenfeld
 
python-an-introduction
python-an-introductionpython-an-introduction
python-an-introduction
Shrinivasan T
 
Intro
IntroIntro
Intro
Daniel Greenfeld
 
Python-The programming Language
Python-The programming LanguagePython-The programming Language
Python-The programming Language
Rohan Gupta
 
Python bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of NairobiPython bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of Nairobi
krmboya
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
gmadhu8
 
Python
PythonPython
Python
Shivam Gupta
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
Shivam Gupta
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
ActiveState
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
Marwan Osman
 
Python update in 2018 #ll2018jp
Python update in 2018 #ll2018jpPython update in 2018 #ll2018jp
Python update in 2018 #ll2018jp
cocodrips
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Ahmed 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 management
Laurent Leturgez
 
Python: The Dynamic!
Python: The Dynamic!Python: The Dynamic!
Python: The Dynamic!
Omid Mogharian
 
Initial Java Core Concept
Initial Java Core ConceptInitial Java Core Concept
Initial Java Core Concept
Rays Technologies
 
Eugene goostman the bot
Eugene goostman the botEugene goostman the bot
Eugene goostman the bot
Natalia Ostapuk
 
Hands on Session on Python
Hands on Session on PythonHands on Session on Python
Hands on Session on Python
Sumit 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 minutes
Sumit 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-introduction
Shrinivasan T
 
Python-The programming Language
Python-The programming LanguagePython-The programming Language
Python-The programming Language
Rohan Gupta
 
Python bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of NairobiPython bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of Nairobi
krmboya
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
gmadhu8
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
Shivam Gupta
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
ActiveState
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
Marwan Osman
 
Python update in 2018 #ll2018jp
Python update in 2018 #ll2018jpPython update in 2018 #ll2018jp
Python update in 2018 #ll2018jp
cocodrips
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Ahmed 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 management
Laurent Leturgez
 
Ad

Recently uploaded (20)

MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Association for Project Management
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Association for Project Management
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
Ad

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
  • 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 :)
  翻译: