python programming tutorial by easylearning guru

26
PYTHON

Upload: easylearning

Post on 14-Jul-2015

399 views

Category:

Engineering


3 download

TRANSCRIPT

PYTHON

Agenda

● What is Python?

● Gems of Python

● Python's users

● Scope of Python

● Major uses of Python

● Why Python

● Getting started with Python

What is Python?

Python is a powerful multi paradigm computer programming language, optimized for programmer productivity, code readability, and software quality.

Guido Van RossumSource code is available under theGNU General Public License (GPL).

Python is named after famous Britishcomedy group

Python: a Complete Language

Python provides simplicity and

ease of use of scripting

Language , along with more

advanced software-

engineering tools typically

found in compiled languages

which makes Python useful for

large-scale development

projects.

Compiled languageScripting language

Features of Python

Portable

Python compiles and runs on every major platform currently in use.Python can be used on 21 different operating systems and environments.

Powerful

Python's toolset places it between traditional scripting languages (Tcl, Scheme and Perl) and systemsdevelopment languages ( C ,C++ and Java)

Mixable

Python programs can be easily glued to components written in other languages.

Ease of Syntax

Java Code to print “Hello World” :

class Hello {

public static void main (String[] args)

{ System.out.println (“Hello, world.”);

}

Python code to print “Hello World”:

print “Hello, World”

Big Names in Python's Users

Why Python?C C++ Java Python

Object oriented No Yes Yes Yes

Functional No Yes No Yes

Type safety Unsafe Unsafe Safe Safe

Type expression Explicit Explicit Explicit Implicit

Type checking Static Static Static Dynamic

Failsafe I/O No No Yes Yes

Readability Difficult Difficult Difficult Easy

Learning Difficult Difficult Difficult Easy

Language Programming Programming Programming Programming and scripting

Length of code 5-10 times greater than python

5-10 times greater than python

3-5 times greater than python

Small and manageable codes

Scope of Python

Python is most demanded language currently as shown by surveys.

What Job Trends Say

The graph here shows

the job trends in

different languages

with Python having the

maximum percentage

growth.

Major uses of Python

Scientific and numeric

programming

GUIs

Camelot provides components for building applications on top of Python, SQLAlchemy and Qt.inspired by the Django admin interface

GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off toolsto complete application suites.

Kivy is a Python library for development of multi-touch enabled media rich applications. The aim is to allow for quick and easy interaction design and rapid prototyping, while making your code reusable and deployable.

Tkinter has the advantage of being included with the Python standard library, making it the most convenient and compatible toolkit to program with.

PyQt is a set of Python v2 and v3 bindings for Digia's Qt application framework and runson all platforms supported by Qt including Windows, MacOS/X and Linux.

pyjs is a Rich Internet Application (RIA) Development Platform for both Web and Desktop.With pyjs you can write your JavaScript-powered web applications entirely in Python.

wxPython is a GUI toolkit for the Python programming language. It allows Pythonprogrammers to create programs with a robust, highly functional graphical userinterface, simply and easily

Numeric and Scientific Programming

>>>a[4,:4:]array([[44,45]

[54,55]])

Scipy Stack Includes modules for linear algebra, optimization, integration, special functions, signal and image processing, statistics, genetic algorithms

Numerical Python adds a fast, compact, multidimensional array facility to Python. creating and manipulating numerical data

IPython is a command shell for interactive computing developed for the Pythonprogramming language that offers enhanced introspection ,rich media, additional shellsyntax, tab completion and rich history.

Matplotlib : Matplotlib is a python 2D plotting library which producespublication quality figures in a variety of hardcopy formats and interactiveenvironments across platforms.Like Pie charts,simple plots,Histograms etc.

Pandas: pandas is an open source, BSD-licensed library providing high-erformance, easy-to-use data structures and data analysis tools for thePython programming language.

Numeric and scientific programming

SymPy :SymPy is a Python library for symbolic mathematics. It is written entirely inpython and doesn’t need any external liberary.

Rapid PrototypingPython is an ideal choice for prototyping because:

It is Dynamically typed language: Python doesn't require you to declare the data type of a variable. This lets you write a function that is generic enough to handle any kind of data.

Python has Rich Set of Data-Structures: Built-in support for lists, dictionaries, sets, etc. reduces the time involved in hunting for a library that provides you those basic data-structures.

Python is Expressive and Succinct: The algorithms that operate on the data-structures are intuitive and simple to use. The final code is more readable than a pseudo code.

Component Integration

It spans multiple platforms, middleware products, and application domains.

Python can fulfill an important integration role in the design of large applications with a long life expectancy.

It allows a fast response to changes in user requirements that require adapting the higher-level application logic without changing the fundamental underlying components.

It also allows quick adaptation of the application to changes in the underlying components.

Getting Started With Python

Print “hello world”

Print (“hello world”)

If else structure

a = 10b = 20If a>b:

print(“a is greater”)else:

print(“b is greater”)

for loop

for x in range(10):print(x)

What we offer…

Thank you for watching the Live Demo for Hadoop.You can always contact us on:

Your queries are always welcome.

Phone : +91 124 4763660 (India)

Email : [email protected]

Skype Id : easylearning.guru

Website : www.easylearning.guru