SlideShare a Scribd company logo
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

More Related Content

PPTX
IHTM Python PCEP Introduction to Python
PPTX
Go Programming language, golang
PPTX
Introduction to python programming, Why Python?, Applications of Python
PDF
Introduction to Python
PDF
Introduction to python programming
PPTX
Python Django Basics
PDF
Go Programming Language by Google
PDF
The Go programming language - Intro by MyLittleAdventure
IHTM Python PCEP Introduction to Python
Go Programming language, golang
Introduction to python programming, Why Python?, Applications of Python
Introduction to Python
Introduction to python programming
Python Django Basics
Go Programming Language by Google
The Go programming language - Intro by MyLittleAdventure

What's hot (20)

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

Viewers also liked (6)

PDF
Talk Code
PDF
Doing magic with python metaclasses
PDF
Beginning Python
PDF
Beginning Python
ODP
Python slide.1
PPTX
Lo1.2 types of computer system error
Talk Code
Doing magic with python metaclasses
Beginning Python
Beginning Python
Python slide.1
Lo1.2 types of computer system error
Ad

Similar to Beginning python programming (20)

ODP
An Intro to Python in 30 minutes
PPTX
python presntation 2.pptx
PDF
Tutorial on-python-programming
PPTX
Python Seminar PPT
PPTX
Python
PDF
python-160403194316.pdf
PPTX
An Introduction To Python - Python, Print()
PPTX
Python - An Introduction
PPTX
Python Basics for first semester Students and everyone
PPTX
cupdf.com_python-seminar-ppt.pptx.........
PPTX
Python Introduction
PDF
Python intro
PPTX
Python basics
PDF
Python (3).pdf
PPTX
2024-25 TYBSC(CS)-PYTHON_PROG_ControlStructure.pptx
PPTX
4_Introduction to Python Programming.pptx
PPTX
Introduction-to-Python-Programming1.pptx
PPTX
A Brief Introduction to Python - English
PDF
05 python.pdf
PDF
Python programming
An Intro to Python in 30 minutes
python presntation 2.pptx
Tutorial on-python-programming
Python Seminar PPT
Python
python-160403194316.pdf
An Introduction To Python - Python, Print()
Python - An Introduction
Python Basics for first semester Students and everyone
cupdf.com_python-seminar-ppt.pptx.........
Python Introduction
Python intro
Python basics
Python (3).pdf
2024-25 TYBSC(CS)-PYTHON_PROG_ControlStructure.pptx
4_Introduction to Python Programming.pptx
Introduction-to-Python-Programming1.pptx
A Brief Introduction to Python - English
05 python.pdf
Python programming

Recently uploaded (20)

PDF
Basic Mud Logging Guide for educational purpose
PDF
Complications of Minimal Access Surgery at WLH
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Lesson notes of climatology university.
PPTX
master seminar digital applications in india
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Computing-Curriculum for Schools in Ghana
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Classroom Observation Tools for Teachers
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Pharma ospi slides which help in ospi learning
Basic Mud Logging Guide for educational purpose
Complications of Minimal Access Surgery at WLH
PPH.pptx obstetrics and gynecology in nursing
GDM (1) (1).pptx small presentation for students
human mycosis Human fungal infections are called human mycosis..pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Lesson notes of climatology university.
master seminar digital applications in india
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Computing-Curriculum for Schools in Ghana
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Classroom Observation Tools for Teachers
2.FourierTransform-ShortQuestionswithAnswers.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Cell Types and Its function , kingdom of life
Final Presentation General Medicine 03-08-2024.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pharma ospi slides which help in ospi learning

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