Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
59 views

Unit-1 Intro To Python

Uploaded by

ranjith
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Unit-1 Intro To Python

Uploaded by

ranjith
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 28

PROGRAMMING WITH

PYTHON
 Course Objectives
 Learn Syntax and Semantics and create
Functions in Python.
 Handle Strings and Files in Python.
 Understand Lists, Dictionaries and Regular
expressions in Python.
 Implement Object Oriented Programming
concepts in Python
PROGRAMMING
WITH PYTHON
 Course Outcomes

 Examine Python syntax and semantics and be fluent in the use


of Python flow control and functions.
 Demonstrate proficiency in handling Strings and File
Systems.
 Create, run and manipulate Python Programs using core data
structures like Lists, Dictionaries and use Regular Expressions.
 Interpret the concepts of Object Oriented Programming as
used in Python
PROGRAMMING
WITH PYTHON
 Course Overview

Unit-1 : Introduction to Python,


Control Statements

Unit-2 : Arrays in Pythons, Strings and


Characters.

Unit-3: Functions,Lists,Tuples,Dictionaries
PROGRAMMING
WITH PYTHON
 Course Overview

Unit-4 : Files, Exceptions and Modules

Unit-5 : OOPS Using Python, Regular


Expressions
PROGRAMMING WITH PYTHON
UNIT-I :: INTRODUCTION TO PYTHON

Introduction
 History

 Features

 Applications

 First Python Program

 Variables

 Data Types

 Numbers

 Operators and I/O Statements


PROGRAMMING WITH PYTHON
UNIT-I CONTROL STATEMENTS
Control Statements
 Conditional Statements

 Indentation

 Looping Statements

 The else suite

 Break

 Continue

 Pass

 Assert

 Return
UNIT-1 INTRODUCTION TO PYTHON

What is Python ?
Python is an general purpose , interpreted, object-oriented,
high-level programming language with dynamic semantics.

It was created by Guido van Rossum in 1991 and further


developed by the Python Software Foundation.

It was designed with an emphasis on code readability, and its


syntax allows programmers to express their concepts in fewer
lines of code.
UNIT-1 INTRODUCTION TO PYTHON
Why Python ?
 Python works on different platforms (Windows, Mac, Linux,
Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.

 Python has syntax that allows developers to write programs


with fewer lines than some other programming languages.
 Python runs on an interpreter system, meaning that code can
be executed as soon as it is written.
 Python can be treated in a procedural way, an object-oriented
way or a functional way.
UNIT-1 INTRODUCTION TO PYTHON
Why Python ?

 Python supports modules and packages.


 Python provides a huge collection of standard
library
UNIT-1 INTRODUCTION TO PYTHON
Python Syntax compared to other programming
languages
Python was designed for readability, and has some similarities
to the English language with influence from mathematics.
Python uses new lines to complete a command, as opposed to
other programming languages which often use semicolons or
parentheses.
Python relies on indentation, using whitespace, to define
scope; such as the scope of loops, functions and classes. Other
programming languages often use curly-brackets for this
purpose.
UNIT-1 INTRODUCTION TO PYTHON
History of Python
Python laid its foundation in the late 1980s.
The implementation of Python was started in December 1989 by
Guido Van Rossum at CWI in Netherland.
In February 1991, Guido Van Rossum published the code (labeled
version 0.9.0) to alt.sources.
In 1994, Python 1.0 was released with new features like lambda,
map, filter, and reduce.
Python 2.0 added new features such as list comprehensions, garbage
collection systems.
On December 3, 2008, Python 3.0 (also called "Py3K") was
released. It was designed to rectify the fundamental flaw of the
language.
UNIT-1 INTRODUCTION TO PYTHON

History of Python
 ABC programming language is said to be the
predecessor of Python language, which was capable of
Exception Handling and interfacing with the Amoeba
Operating System.
 The following programming languages influence
Python:
 ABC language.
 Modula-3
UNIT-1 INTRODUCTION TO PYTHON

Features of Python
 High Level Language

 Object Oriented Language

 Scalable

 Extensible

 Portable

 Easy to Read, Learn and Maintain

 Interpreted Language

 Free and Open Source

 Large Standard Library

 Dynamically Typed Language


UNIT-1 INTRODUCTION TO PYTHON

Features of Python
High Level Language
Python is a high-level language. When we write programs in
python, we do not need to remember the system architecture,
nor do we need to manage the memory. It is easy to
understand ,

Object Oriented Language


One of the key features of python is Object-Oriented
programming. OOP allows for associating specific behaviors,
characteristics, and/or capabilities with the data that they
execute on.
It is actually a pleasant mix of multiple programming
paradigms.
UNIT-1 INTRODUCTION TO PYTHON

Features of Python
Scalable
Python provides basic building blocks on which you can build
an application, and as those needs expand and grow, Python's
pluggable and modular architecture allows your project to
flourish as well as maintain manageability

Extensible
Python is a Extensible language. We can write us some Python
code into C or C++ language and also we can compile that
code in C/C++ language.
UNIT-1 INTRODUCTION TO PYTHON

Features of Python
Portable
Python language is also a portable language. For example, if
we have python code for windows and if we want to run this
code on other platforms such as Linux, Unix, and Mac then we
do not need to change it, we can run this code on any platform.

Easy to Read, Learn and Maintain


Python is extremely easy to learn.
Python has relatively few keywords, simple structure, and a
clearly defined syntax
The indentation used instead of curly braces in Python makes
it very easy to read Python code
UNIT-1 INTRODUCTION TO PYTHON

Features of Python
Intrepreted Language
Python is an Interpreted Language because Python code is
executed line by line at a time. The source code of python is
converted into an immediate form called bytecode

Free and Open Source


Python is an open-source programming language and one can
download it for free
UNIT-1 INTRODUCTION TO PYTHON

Features of Python
Large Standard Library
Python has a large standard library which provides a rich set
of module and functions. There are many libraries present in
python for such as regular expressions, unit-testing, web
browsers, etc

Dynamically Type Language


Python is a dynamically-typed language. That means the type
(for example- int, double, long, etc.) for a variable is decided
at run time not in advance because of this feature we don’t
need to specify the type of variable.
UNIT-1 INTRODUCTION TO PYTHON

Applications of Python

Python is used in many application domains.

 Web and Internet Development


 Scientific and Numeric

 Desktop GUIs

 Software Development

 Business Applications

 Image Processing Application


UNIT-1 INTRODUCTION TO PYTHON
Applications of Python
Web and Internet Development
Python is used to develop web applications.
It provides libraries to handle internet protocols such as HTML
and XML, JSON, Email processing, request….
One of Python web-framework named Django is used on
Instagram.
Python provides many useful frameworks, and these are given
below:
Django and Pyramid framework(Use for heavy applications)
Flask and Bottle (Micro-framework)
UNIT-1 INTRODUCTION TO PYTHON

Applications of Python
Scientific and Numeric
Python is widely used in scientific and numeric computing:
It consists of many scientific and mathematical libraries, which
makes easy to solve complex calculations.
SciPy,
Pandas,
NumPy,
Scikit-learn
UNIT-1 INTRODUCTION TO PYTHON

Applications of Python
Desktop GUIs
Python provides a Tk GUI library to develop a user interface.
Some popular GUI libraries are given below.

 Tkinter or Tk
 wxWidgetM

 Kivy (used for writing multitouch applications )


UNIT-1 INTRODUCTION TO PYTHON
Applications of Python
Software Development
 Python is often used as a support language for
software developers, for build control and
management, testing, and in many other ways.
 SCons for build control.

 Buildbot and Apache Gump for automated


continuous compilation and testing.
 Roundup or Trac for bug tracking and project
management.
UNIT-1 INTRODUCTION TO PYTHON

Applications of Python
Business Applications
Python is also used to build ERP and e-commerce
systems:
Odoo is an all-in-one management software that offers
a range of business applications that form a complete
suite of enterprise management applications.
Tryton is a three-tier high-level general purpose
application platform.
UNIT-1 INTRODUCTION TO PYTHON

Applications of Python
Image Process Applications
 Python contains many libraries that are used to work with the
image. The image can be manipulated according to our
requirements. Some libraries of image processing are given
below.
 OpenCV

 Pillow

 SimpleITK

You might also like