SlideShare una empresa de Scribd logo
1 de 28
Beginning Python
  Programming
            Kantesh Raj
           (@kanteshraj)
Quick Question


Name       major programming
languages taught at school or
colleges ?
According to my knowledge
●   C

●   C++

●   Java

●   PHP / ASP.NET (Few Places)
Then....

     Why we need python?

Lets do a simple activity for this
Activity

Write a code for “Hello World”
in any language you like, other
than python
Hello World Program in C

#include <stdio.h>
main()
{
    printf(“Hello World”);
}


// No. Of Lines Of Code: 5
How many lines of code
     you wrote
         ?
Now,

Hello World program in Python
print “Hello World”
What is Python?


● Python is dynamic, open source
  programming language with a focus
  on simplicity and productivity.
● It was developed in 1991
Who is he?
Who is he?




Guido van Rossum
Creator of Python
Python
●   Interpreter Based language
●   Designed to be easy to learn and master
      -> clear syntax
      -> Very few keyword
●   Highly portable
      -> Run on all platform(OS)
●   Large set of library
      -> libraries for huge number of software
Can Do
●   System Administration
●   GUI programming
●   Web Application
●   Database Apps
●   Scientific Application
●   Games
●   Android App development
Getting Familiar with python
●   Extension for python file : .py

●   For example
    Hello.py
    ALiAS.py
No Semicolons


print “Hello Everyone”
print 2+2
Indentation
●   File: HelloWrong.py
    print “Hello”
      print “World”
●   File: HelloCorrect.py
    print “Hello”
    print “World”
No variable data type declaration
    x=5
    print x
    print x*9


●   Python will do it for you :)
Input from keyboard
●   Function for that: raw_input()
●   It always return string type
●   Example:
    x=raw_input(“Enter number”)
    print x
    y=int(x)+2
    print y
    print “the final value is ”+str(y)
It will make your work easy

●   bpython

●   ipython
Demo 1

Program to take input from user
and print “python is awesome”, if
user enter number less than 5
otherwise print “Hello ALiAS”.
Demo 2
● Write a function for printing value
  from array using for loop.
● Use above function in other program

  by help of import.
Demo 3
●   Program to create a file in python
    and write “this is python basic
    session.”
Demo 4
●   Python program for listing file in
    home directory
Where to refer ?
●   Python Website: documentation
    http://www.python.org/

●   Dive into python:ebook
    http://www.diveintopython.net

●   How to think like a computer scientish:
    ebook
    http://www.greenteapress.com/
PyCon




http://in.pycon.org/2012/
Any Question ?
About Me
●   Name: Kantesh Raj
●   Twitter: @kanteshraj
●   Blog: kanteshraj.blogspot.in



                   Thank You

Más contenido relacionado

La actualidad más candente

Introducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betaIntroducing Yeoman 1.0 beta
Introducing Yeoman 1.0 beta
digitalzombie
 

La actualidad más candente (20)

Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs
 
Learning Python with PyCharm EDU
Learning Python with PyCharm EDU Learning Python with PyCharm EDU
Learning Python with PyCharm EDU
 
welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?
 
Go lang
Go langGo lang
Go lang
 
Ruxmon.2013-08.-.CodeBro!
Ruxmon.2013-08.-.CodeBro!Ruxmon.2013-08.-.CodeBro!
Ruxmon.2013-08.-.CodeBro!
 
a glance at computer programming
a glance at computer programminga glance at computer programming
a glance at computer programming
 
Decision making - for loop , nested loop ,if-else statements , switch in goph...
Decision making - for loop , nested loop ,if-else statements , switch in goph...Decision making - for loop , nested loop ,if-else statements , switch in goph...
Decision making - for loop , nested loop ,if-else statements , switch in goph...
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
 
Introducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betaIntroducing Yeoman 1.0 beta
Introducing Yeoman 1.0 beta
 
Debugging (Django) application in PyCharm
Debugging (Django) application in PyCharmDebugging (Django) application in PyCharm
Debugging (Django) application in PyCharm
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
 
Introduction to Go programming
Introduction to Go programmingIntroduction to Go programming
Introduction to Go programming
 
Golang nuts (by Nii Nai at DevCongress 2013)
Golang nuts (by Nii Nai at DevCongress 2013)Golang nuts (by Nii Nai at DevCongress 2013)
Golang nuts (by Nii Nai at DevCongress 2013)
 
From NodeJS to Rust
From NodeJS to RustFrom NodeJS to Rust
From NodeJS to Rust
 
Infecting Python Bytecode
Infecting Python BytecodeInfecting Python Bytecode
Infecting Python Bytecode
 
Monorepo at Pinterest
Monorepo at PinterestMonorepo at Pinterest
Monorepo at Pinterest
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 

Destacado (6)

Talk Code
Talk CodeTalk Code
Talk Code
 
Doing magic with python metaclasses
Doing magic with python metaclassesDoing magic with python metaclasses
Doing magic with python metaclasses
 
Beginning Python
Beginning PythonBeginning Python
Beginning Python
 
Beginning Python
Beginning PythonBeginning Python
Beginning Python
 
Python slide.1
Python slide.1Python slide.1
Python slide.1
 
Lo1.2 types of computer system error
Lo1.2 types of computer system errorLo1.2 types of computer system error
Lo1.2 types of computer system error
 

Similar a Beginning python programming

Introduction to Python Programming language.pptx
Introduction to Python Programming language.pptxIntroduction to Python Programming language.pptx
Introduction to Python Programming language.pptx
BharathYusha1
 
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdfThe Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
ssuser8b3cdd
 

Similar a Beginning python programming (20)

Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
 
Introduction to Python Programming language.pptx
Introduction to Python Programming language.pptxIntroduction to Python Programming language.pptx
Introduction to Python Programming language.pptx
 
python intro and installation.pptx
python intro and installation.pptxpython intro and installation.pptx
python intro and installation.pptx
 
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdfThe Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 
Lecture01 - Fundamental Programming with Python Language
Lecture01 - Fundamental Programming with Python LanguageLecture01 - Fundamental Programming with Python Language
Lecture01 - Fundamental Programming with Python Language
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Introduction python
Introduction pythonIntroduction python
Introduction python
 
Ctrc python
Ctrc pythonCtrc python
Ctrc python
 
637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx
 
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Seminar report On Python
Seminar report On PythonSeminar report On Python
Seminar report On Python
 
Python Programming Part 1.pdf
Python Programming Part 1.pdfPython Programming Part 1.pdf
Python Programming Part 1.pdf
 
Python Programming Part 1.pdf
Python Programming Part 1.pdfPython Programming Part 1.pdf
Python Programming Part 1.pdf
 
Python Programming Part 1.pdf
Python Programming Part 1.pdfPython Programming Part 1.pdf
Python Programming Part 1.pdf
 
POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 

Beginning python programming

  • 1. Beginning Python Programming Kantesh Raj (@kanteshraj)
  • 2. Quick Question Name major programming languages taught at school or colleges ?
  • 3. According to my knowledge ● C ● C++ ● Java ● PHP / ASP.NET (Few Places)
  • 4. Then.... Why we need python? Lets do a simple activity for this
  • 5. Activity Write a code for “Hello World” in any language you like, other than python
  • 6. Hello World Program in C #include <stdio.h> main() { printf(“Hello World”); } // No. Of Lines Of Code: 5
  • 7. How many lines of code you wrote ?
  • 10. What is Python? ● Python is dynamic, open source programming language with a focus on simplicity and productivity. ● It was developed in 1991
  • 12. Who is he? Guido van Rossum Creator of Python
  • 13. Python ● Interpreter Based language ● Designed to be easy to learn and master -> clear syntax -> Very few keyword ● Highly portable -> Run on all platform(OS) ● Large set of library -> libraries for huge number of software
  • 14. Can Do ● System Administration ● GUI programming ● Web Application ● Database Apps ● Scientific Application ● Games ● Android App development
  • 15. Getting Familiar with python ● Extension for python file : .py ● For example Hello.py ALiAS.py
  • 16. No Semicolons print “Hello Everyone” print 2+2
  • 17. Indentation ● File: HelloWrong.py print “Hello” print “World” ● File: HelloCorrect.py print “Hello” print “World”
  • 18. No variable data type declaration x=5 print x print x*9 ● Python will do it for you :)
  • 19. Input from keyboard ● Function for that: raw_input() ● It always return string type ● Example: x=raw_input(“Enter number”) print x y=int(x)+2 print y print “the final value is ”+str(y)
  • 20. It will make your work easy ● bpython ● ipython
  • 21. Demo 1 Program to take input from user and print “python is awesome”, if user enter number less than 5 otherwise print “Hello ALiAS”.
  • 22. Demo 2 ● Write a function for printing value from array using for loop. ● Use above function in other program by help of import.
  • 23. Demo 3 ● Program to create a file in python and write “this is python basic session.”
  • 24. Demo 4 ● Python program for listing file in home directory
  • 25. Where to refer ? ● Python Website: documentation http://www.python.org/ ● Dive into python:ebook http://www.diveintopython.net ● How to think like a computer scientish: ebook http://www.greenteapress.com/
  • 28. About Me ● Name: Kantesh Raj ● Twitter: @kanteshraj ● Blog: kanteshraj.blogspot.in Thank You