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

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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 

Último (20)

General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

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