Beginning Python  Programming            Kantesh Raj           (@kanteshraj)
Quick QuestionName       major programminglanguages taught at school orcolleges ?
According to my knowledge●   C●   C++●   Java●   PHP / ASP.NET (Few Places)
Then....     Why we need python?Lets do a simple activity for this
ActivityWrite a code for “Hello World”in any language you like, otherthan 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 wa...
Who is he?
Who is he?Guido van RossumCreator of Python
Python●   Interpreter Based language●   Designed to be easy to learn and master      -> clear syntax      -> Very few keyw...
Can Do●   System Administration●   GUI programming●   Web Application●   Database Apps●   Scientific Application●   Games●...
Getting Familiar with python●   Extension for python file : .py●   For example    Hello.py    ALiAS.py
No Semicolonsprint “Hello Everyone”print 2+2
Indentation●   File: HelloWrong.py    print “Hello”      print “World”●   File: HelloCorrect.py    print “Hello”    print ...
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 nu...
It will make your work easy●   bpython●   ipython
Demo 1Program to take input from userand print “python is awesome”, ifuser enter number less than 5otherwise print “Hello ...
Demo 2● Write a function for printing value  from array using for loop.● Use above function in other program  by help of i...
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.divein...
PyConhttp://in.pycon.org/2012/
Any Question ?
About Me●   Name: Kantesh Raj●   Twitter: @kanteshraj●   Blog: kanteshraj.blogspot.in                   Thank You
Upcoming SlideShare
Loading in...5
×

Beginning python programming

864

Published on

Basic overview of python for newbie

Published in: Education, Technology
2 Comments
1 Like
Statistics
Notes
No Downloads
Views
Total Views
864
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
78
Comments
2
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Beginning python programming"

  1. 1. Beginning Python Programming Kantesh Raj (@kanteshraj)
  2. 2. Quick QuestionName major programminglanguages taught at school orcolleges ?
  3. 3. According to my knowledge● C● C++● Java● PHP / ASP.NET (Few Places)
  4. 4. Then.... Why we need python?Lets do a simple activity for this
  5. 5. ActivityWrite a code for “Hello World”in any language you like, otherthan python
  6. 6. Hello World Program in C#include <stdio.h>main(){ printf(“Hello World”);}// No. Of Lines Of Code: 5
  7. 7. How many lines of code you wrote ?
  8. 8. Now,Hello World program in Python
  9. 9. print “Hello World”
  10. 10. What is Python?● Python is dynamic, open source programming language with a focus on simplicity and productivity.● It was developed in 1991
  11. 11. Who is he?
  12. 12. Who is he?Guido van RossumCreator of Python
  13. 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. 14. Can Do● System Administration● GUI programming● Web Application● Database Apps● Scientific Application● Games● Android App development
  15. 15. Getting Familiar with python● Extension for python file : .py● For example Hello.py ALiAS.py
  16. 16. No Semicolonsprint “Hello Everyone”print 2+2
  17. 17. Indentation● File: HelloWrong.py print “Hello” print “World”● File: HelloCorrect.py print “Hello” print “World”
  18. 18. No variable data type declaration x=5 print x print x*9● Python will do it for you :)
  19. 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. 20. It will make your work easy● bpython● ipython
  21. 21. Demo 1Program to take input from userand print “python is awesome”, ifuser enter number less than 5otherwise print “Hello ALiAS”.
  22. 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. 23. Demo 3● Program to create a file in python and write “this is python basic session.”
  24. 24. Demo 4● Python program for listing file in home directory
  25. 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/
  26. 26. PyConhttp://in.pycon.org/2012/
  27. 27. Any Question ?
  28. 28. About Me● Name: Kantesh Raj● Twitter: @kanteshraj● Blog: kanteshraj.blogspot.in Thank You
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×