Introduction
Python
Python
● Combines the features of C and JAVA
● It offers elegant style of developing programs like C
● It offers classes and objects like Java
Features of Python
● Simple
● More clarity
● Less stress on reading and understanding the syntax
● Easy to learn
● Uses very few keywords
● Very simple structure, resembles C
● Open source
● High level language
● Dynamically typed
● Type of the variable is not declared statically
Features of Python...
● Platform Independent
○ Python compiler generates byte code
○ PVM interprets the byte code
● Portable
● Procedure and Object oriented language
● Interpreted
● Extensible
● Embeddable
● Huge Library
● Scripting Language
● Database Connectivity
○ Provides interfaces to DB like Oracle, Sybase or MySql
Execution of a Python Program
● Example:
● x.py → python_compiler → x.pyc → PVM → Machine_Code
● python -m py_compile x.py
● python x.cpython-34.py
● python -m dis add.py
Memory Management in Python
● In C or C++, allocation and deallocation of memory will be done manually
● malloc(), calloc(), realloc() or free()
● In python, it is done at run time automatically
● Memory Manager inside the PVM takes care of allocating memory for all objects in
Python.
● All objects are stored in Heap
Garbage Collection in Python
● Garbage collector is a module in Python that is useful to delete objects from memory
which are not used in the program.
● The module that represents the GC is gc.
● It will keep track of how many times the object is referenced.
● If it is referenced 0 times, then gc will remove object from memory.
C Vs Python
C Python
Procedure Oriented language Object Oriented language
Faster Slower
Compulsory to declare the data types of variables Data Types are not required
Type discipline is static and weak Dynamic and strong
Pointers concept present No pointers concept
No exception handling facility Exception handling facility is robust
Do-while is present Absent
Has switch statement No Switch
C Vs Python
C Python
Manually allocate the memory Automatic
Absence of GC GC is present
Supports Single and multi dimensional arrays Supports only single dimension
Array should be positive Can be Positive or negative
Array bounds checking is not present Present
Indentation is not necessary Strictly needed
Every statement is terminated by ; No semicolon

More Related Content

PDF
Introduction to python
PPTX
Introduction to python programming, Why Python?, Applications of Python
PDF
How to write a well-behaved Python command line application
PDF
Introduction to python programming
PDF
Introduction to the LLVM Compiler System
PPTX
Python 101 For The Net Developer
PPTX
Wonders of Golang
Introduction to python
Introduction to python programming, Why Python?, Applications of Python
How to write a well-behaved Python command line application
Introduction to python programming
Introduction to the LLVM Compiler System
Python 101 For The Net Developer
Wonders of Golang

What's hot (20)

PPTX
IHTM Python PCEP Introduction to Python
PPTX
Python tutorial for beginners - Tib academy
PDF
Introduction to protocol buffer
PDF
Introduction to Python
PPTX
Basics of python
PPT
Lua vs python
ZIP
An Introduction to PyPy
PDF
PyPy
PPTX
Introduction python
PPT
a quick Introduction to PyPy
KEY
Four Python Pains
PDF
平行化你的工作 part1
PDF
Clang Analyzer Tool Review
PDF
Python in real world.
PPT
PDF
Clang: More than just a C/C++ Compiler
PPTX
Tech Days 2015: Multi-language Programming with GPRbuild
PPTX
Tech Days 2015: SPARK 2014
PDF
Whirlwind tour of the Runtime Dynamic Linker
IHTM Python PCEP Introduction to Python
Python tutorial for beginners - Tib academy
Introduction to protocol buffer
Introduction to Python
Basics of python
Lua vs python
An Introduction to PyPy
PyPy
Introduction python
a quick Introduction to PyPy
Four Python Pains
平行化你的工作 part1
Clang Analyzer Tool Review
Python in real world.
Clang: More than just a C/C++ Compiler
Tech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: SPARK 2014
Whirlwind tour of the Runtime Dynamic Linker
Ad

Similar to Introduction to Python (20)

PPTX
Introduction to Python Programing
PPTX
Programming in python in detail concept .pptx
PPT
Python Introduction.ppt
PDF
introduction of python in data science
PPTX
What is python
PDF
PDF
Research paper on python by Rj
PPTX
Python.pptx
PPTX
Basic Python Introduction Lecture 1.pptx
PPTX
Lecture 1.pptx
PPTX
Python Way of Program is a topic for beginners
PPTX
IPT 2.pptx
PPTX
Introduction to Python Programming - I
PPT
Python Programming Unit1_Aditya College of Engg & Tech
DOCX
Python Programming and ApplicationsUnit-1.docx
PPTX
POWER OF PYTHON PROGRAMMING LANGUAGE
DOCX
Python introduction
PPTX
Python Class 1
PPTX
Python Programming Language
Introduction to Python Programing
Programming in python in detail concept .pptx
Python Introduction.ppt
introduction of python in data science
What is python
Research paper on python by Rj
Python.pptx
Basic Python Introduction Lecture 1.pptx
Lecture 1.pptx
Python Way of Program is a topic for beginners
IPT 2.pptx
Introduction to Python Programming - I
Python Programming Unit1_Aditya College of Engg & Tech
Python Programming and ApplicationsUnit-1.docx
POWER OF PYTHON PROGRAMMING LANGUAGE
Python introduction
Python Class 1
Python Programming Language
Ad

More from Emertxe Information Technologies Pvt Ltd (20)

Recently uploaded (20)

PDF
Climate and Adaptation MCQs class 7 from chatgpt
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
DRUGS USED FOR HORMONAL DISORDER, SUPPLIMENTATION, CONTRACEPTION, & MEDICAL T...
PDF
International_Financial_Reporting_Standa.pdf
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PPTX
Education and Perspectives of Education.pptx
PPTX
Climate Change and Its Global Impact.pptx
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
Module on health assessment of CHN. pptx
PPTX
Computer Architecture Input Output Memory.pptx
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
English Textual Question & Ans (12th Class).pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Climate and Adaptation MCQs class 7 from chatgpt
Unit 4 Computer Architecture Multicore Processor.pptx
AI-driven educational solutions for real-life interventions in the Philippine...
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
Empowerment Technology for Senior High School Guide
Hazard Identification & Risk Assessment .pdf
DRUGS USED FOR HORMONAL DISORDER, SUPPLIMENTATION, CONTRACEPTION, & MEDICAL T...
International_Financial_Reporting_Standa.pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
Education and Perspectives of Education.pptx
Climate Change and Its Global Impact.pptx
B.Sc. DS Unit 2 Software Engineering.pptx
Module on health assessment of CHN. pptx
Computer Architecture Input Output Memory.pptx
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
English Textual Question & Ans (12th Class).pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf

Introduction to Python

  • 2. Python ● Combines the features of C and JAVA ● It offers elegant style of developing programs like C ● It offers classes and objects like Java
  • 3. Features of Python ● Simple ● More clarity ● Less stress on reading and understanding the syntax ● Easy to learn ● Uses very few keywords ● Very simple structure, resembles C ● Open source ● High level language ● Dynamically typed ● Type of the variable is not declared statically
  • 4. Features of Python... ● Platform Independent ○ Python compiler generates byte code ○ PVM interprets the byte code ● Portable ● Procedure and Object oriented language ● Interpreted ● Extensible ● Embeddable ● Huge Library ● Scripting Language ● Database Connectivity ○ Provides interfaces to DB like Oracle, Sybase or MySql
  • 5. Execution of a Python Program ● Example: ● x.py → python_compiler → x.pyc → PVM → Machine_Code ● python -m py_compile x.py ● python x.cpython-34.py ● python -m dis add.py
  • 6. Memory Management in Python ● In C or C++, allocation and deallocation of memory will be done manually ● malloc(), calloc(), realloc() or free() ● In python, it is done at run time automatically ● Memory Manager inside the PVM takes care of allocating memory for all objects in Python. ● All objects are stored in Heap
  • 7. Garbage Collection in Python ● Garbage collector is a module in Python that is useful to delete objects from memory which are not used in the program. ● The module that represents the GC is gc. ● It will keep track of how many times the object is referenced. ● If it is referenced 0 times, then gc will remove object from memory.
  • 8. C Vs Python C Python Procedure Oriented language Object Oriented language Faster Slower Compulsory to declare the data types of variables Data Types are not required Type discipline is static and weak Dynamic and strong Pointers concept present No pointers concept No exception handling facility Exception handling facility is robust Do-while is present Absent Has switch statement No Switch
  • 9. C Vs Python C Python Manually allocate the memory Automatic Absence of GC GC is present Supports Single and multi dimensional arrays Supports only single dimension Array should be positive Can be Positive or negative Array bounds checking is not present Present Indentation is not necessary Strictly needed Every statement is terminated by ; No semicolon