Beginning python programming
Upcoming SlideShare
Loading in...5

Beginning python programming



Basic overview of python for newbie

Basic overview of python for newbie



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds


Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Beginning python programming Beginning python programming Presentation Transcript

  • 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 was developed in 1991
  • 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 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
  • No Semicolonsprint “Hello Everyone”print 2+2
  • Indentation● File: print “Hello” print “World”● File: 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 1Program to take input from userand print “python is awesome”, ifuser enter number less than 5otherwise 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● Dive into python:ebook● How to think like a computer scientish: ebook
  • PyCon
  • Any Question ?
  • About Me● Name: Kantesh Raj● Twitter: @kanteshraj● Blog: Thank You