SlideShare a Scribd company logo
Sujit Shakya
Python
Programming Language?
Language is a tool to perform certain task.
Categories:
Compiled language & Interpreted/Scripting
Language
C, C++ are the example of Compiled Language.
PHP, Perl are the example of Scripting Language
What is Python?
Compiled Language or Scripting Language?
What is Python?
Compiled Language or Scripting Language?
Python was developed by Guido van Rossum in the
late 1980s.
It is an Object Oriented High Level Language.
Python is a scripting language, but in principle, it is first compiled and
then interpreted.
Guido Van Rossum
Why Python?
print “hello” #display hello in the screen
include<stdio.h>
include<conio.h>
void main()
{
printf(“Hello World”); /*display hello in the screen*/
getch();
}
Python focuses on user readability and
simplicity
pi = 3.14
for r in range(4):
area = pi * r*r
print r, area
print “End of Program”
Python is dynamic in nature.
#include<stdio.h>
#include<conio.h>
void main(){
float pi = 3.14;
int r;
float area = 0;
for(r=0; r<5; r++){
area = pi * r*r;
printf(“%d %f”, r, area);
}
printf(“End of Program”);
}
Why Python?
Why Python?
 Beautiful is better than ugly.
 Explicit is better than implicit.
 Simple is better than complex.
 Complex is better than complicated.
 Readability counts.
Lots of documentation and resources are
available in internet for FREE !!
Why not Python?
 Its dynamic nature costs more memory usage.
 Its execution is slower than other compiled language
like C and java.
Who uses Python?
Who uses Python?
Who uses Python?
Who uses Python?
How to use Python?
Installation
Download python 2.7 interpreter from http://www.python.org/download/
and install it.
How to use Python?
Installation
Download python 2.7 interpreter from http://www.python.org/download/
and install it.
Getting Started
Open python shell from start menu.
Open the new window from file menu, write some python code and
press F5.
Or, simply type your python code and press enter.
How to use Python?
Basic Syntax
#print something on screen
print “something”
How to use Python?
Basic Syntax
#print something on screen
print “something”
#if condition
if some_condition_1:
statements 1
elif some_condition_2:
statement 2
else:
statement 3
How to use Python?
Basic Syntax
#for loop
for count in range(10):
do something for 10 times starting from 0-9
How to use Python?
Basic Syntax
#for loop
for count in range(10):
do something for 10 times starting from 0-9
#while loop
i=0
while i<5:
print “hello”, i
i+=1
How to use Python?
Basic Syntax
#list
num_list = [0,1,2,3,4,5]
print num_list[0] #prints 0
print num_list[9] #Error: index out of range
How to use Python?
Basic Syntax
#list
num_list = [0,1,2,3,4,5]
print num_list[0] #prints 0
print num_list[9] #Error: index out of range
#exception handling
try:
print num_list[9]
except:
print “Oops something went wrong”
How to use Python?
Basic Syntax
#function
def sample_function:
„‟‟some code written here. Where triple quote is a
multiple line comment and also a documentation for
your function‟‟‟
GUI application using Python.
Python has a huge number of GUI framework (or
toolkit).
Some of them are:1. Tkinter
2. PyQt
3. PyGTK
4. PyUI
and many more…………
Web Application using
Python.
Python has a huge number of web framework.
Some of them are:
1. Django Web Framework
2. Cherry Py
3. Web2py
4. Zope2
and many more…………
Thank You!!!!

More Related Content

PPT
An alternative to xs
PPTX
a glance at computer programming
PPTX
Python tutorial for beginners - Tib academy
PPTX
Introduction python
PDF
Getting started with python
PDF
Introduction to python programming
PPT
Intro cpp
PPTX
IHTM Python PCEP Introduction to Python
An alternative to xs
a glance at computer programming
Python tutorial for beginners - Tib academy
Introduction python
Getting started with python
Introduction to python programming
Intro cpp
IHTM Python PCEP Introduction to Python

What's hot (6)

PPTX
Introduction to python programming, Why Python?, Applications of Python
PPT
1.python interpreter and interactive mode
PDF
The Ring programming language version 1.5.3 book - Part 16 of 184
PDF
Introduction to Python
PPTX
Expo java
PPTX
Basics of python
Introduction to python programming, Why Python?, Applications of Python
1.python interpreter and interactive mode
The Ring programming language version 1.5.3 book - Part 16 of 184
Introduction to Python
Expo java
Basics of python
Ad

Viewers also liked (10)

PDF
Intro to Python
PPTX
Samarjit Kachari-New media:Hope for literature and language survival?
PDF
Health 2.0 pre ga slides day 1 & change management
PDF
Welcome to Python
PDF
Intro to Python Workshop San Diego, CA (January 19, 2013)
PDF
Python: The Programmer's Lingua Franca
PDF
Intro to Python
PDF
Python
PDF
Why Python is better for Data Science
PPTX
Hadoop with Python
Intro to Python
Samarjit Kachari-New media:Hope for literature and language survival?
Health 2.0 pre ga slides day 1 & change management
Welcome to Python
Intro to Python Workshop San Diego, CA (January 19, 2013)
Python: The Programmer's Lingua Franca
Intro to Python
Python
Why Python is better for Data Science
Hadoop with Python
Ad

Similar to Ctrc python (20)

PPTX
Python Programming Draft PPT.pptx
PDF
intro.pptx (1).pdf
PPTX
python programminig and introduction.pptx
PPTX
Introduction to python for Beginners
PPTX
Phython Programming Language
PDF
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
PPTX
Python Tutorial | Python Programming Language
PPT
Python programming-2-2048 (30 files merged).ppt
PPT
Python programming notes all in one python ppt
PPTX
Chapter 2: Basics of programming pyton programming
PPTX
Python presentation by Monu Sharma
PDF
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
PPTX
An Introduction To Python - Python, Print()
DOCX
Seminar report on python 3 course
PPTX
PYTHON TUTORIALS.pptx
PPTX
Python is a high-level, interpreted programming language known for its simpli...
PPTX
Python is a high-level, interpreted programming language known for its simpli...
PPTX
Python is a high-level, interpreted programming language that emphasizes read...
PPTX
Python programming language introduction unit
DOCX
Seminar report On Python
Python Programming Draft PPT.pptx
intro.pptx (1).pdf
python programminig and introduction.pptx
Introduction to python for Beginners
Phython Programming Language
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Python Tutorial | Python Programming Language
Python programming-2-2048 (30 files merged).ppt
Python programming notes all in one python ppt
Chapter 2: Basics of programming pyton programming
Python presentation by Monu Sharma
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
An Introduction To Python - Python, Print()
Seminar report on python 3 course
PYTHON TUTORIALS.pptx
Python is a high-level, interpreted programming language known for its simpli...
Python is a high-level, interpreted programming language known for its simpli...
Python is a high-level, interpreted programming language that emphasizes read...
Python programming language introduction unit
Seminar report On Python

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Encapsulation theory and applications.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
KodekX | Application Modernization Development
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Programs and apps: productivity, graphics, security and other tools
MIND Revenue Release Quarter 2 2025 Press Release
Encapsulation theory and applications.pdf
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The AUB Centre for AI in Media Proposal.docx
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectroscopy.pptx food analysis technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Review of recent advances in non-invasive hemoglobin estimation
Network Security Unit 5.pdf for BCA BBA.
KodekX | Application Modernization Development

Ctrc python

  • 2. Programming Language? Language is a tool to perform certain task. Categories: Compiled language & Interpreted/Scripting Language C, C++ are the example of Compiled Language. PHP, Perl are the example of Scripting Language
  • 3. What is Python? Compiled Language or Scripting Language?
  • 4. What is Python? Compiled Language or Scripting Language? Python was developed by Guido van Rossum in the late 1980s. It is an Object Oriented High Level Language. Python is a scripting language, but in principle, it is first compiled and then interpreted.
  • 6. Why Python? print “hello” #display hello in the screen include<stdio.h> include<conio.h> void main() { printf(“Hello World”); /*display hello in the screen*/ getch(); } Python focuses on user readability and simplicity
  • 7. pi = 3.14 for r in range(4): area = pi * r*r print r, area print “End of Program” Python is dynamic in nature. #include<stdio.h> #include<conio.h> void main(){ float pi = 3.14; int r; float area = 0; for(r=0; r<5; r++){ area = pi * r*r; printf(“%d %f”, r, area); } printf(“End of Program”); } Why Python?
  • 8. Why Python?  Beautiful is better than ugly.  Explicit is better than implicit.  Simple is better than complex.  Complex is better than complicated.  Readability counts. Lots of documentation and resources are available in internet for FREE !!
  • 9. Why not Python?  Its dynamic nature costs more memory usage.  Its execution is slower than other compiled language like C and java.
  • 14. How to use Python? Installation Download python 2.7 interpreter from http://www.python.org/download/ and install it.
  • 15. How to use Python? Installation Download python 2.7 interpreter from http://www.python.org/download/ and install it. Getting Started Open python shell from start menu. Open the new window from file menu, write some python code and press F5. Or, simply type your python code and press enter.
  • 16. How to use Python? Basic Syntax #print something on screen print “something”
  • 17. How to use Python? Basic Syntax #print something on screen print “something” #if condition if some_condition_1: statements 1 elif some_condition_2: statement 2 else: statement 3
  • 18. How to use Python? Basic Syntax #for loop for count in range(10): do something for 10 times starting from 0-9
  • 19. How to use Python? Basic Syntax #for loop for count in range(10): do something for 10 times starting from 0-9 #while loop i=0 while i<5: print “hello”, i i+=1
  • 20. How to use Python? Basic Syntax #list num_list = [0,1,2,3,4,5] print num_list[0] #prints 0 print num_list[9] #Error: index out of range
  • 21. How to use Python? Basic Syntax #list num_list = [0,1,2,3,4,5] print num_list[0] #prints 0 print num_list[9] #Error: index out of range #exception handling try: print num_list[9] except: print “Oops something went wrong”
  • 22. How to use Python? Basic Syntax #function def sample_function: „‟‟some code written here. Where triple quote is a multiple line comment and also a documentation for your function‟‟‟
  • 23. GUI application using Python. Python has a huge number of GUI framework (or toolkit). Some of them are:1. Tkinter 2. PyQt 3. PyGTK 4. PyUI and many more…………
  • 24. Web Application using Python. Python has a huge number of web framework. Some of them are: 1. Django Web Framework 2. Cherry Py 3. Web2py 4. Zope2 and many more…………