Top Banner
Python - The informal way Vikash Agrawal [email protected] @ivikashagrawal Google Technology Users Group, Manipal October 31, 2011
42
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: What makes Python So Awesome

Python - The informal way

Vikash [email protected]

@ivikashagrawal

Google Technology Users Group, Manipal

October 31, 2011

Page 2: What makes Python So Awesome

Index

1 Awesome Languages

2 History

3 Who uses Python

4 How far from C/C++/Java

5 Versions of Python

6 Language Basics

7 Codes

8 Que and Ans

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 2 / 11

Page 3: What makes Python So Awesome

Awesome Language

Name any Awesome language

Why is it awesome?

Don’t worry we wont go into language wars

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 3 / 11

Page 4: What makes Python So Awesome

Awesome Language

Name any Awesome language

Why is it awesome?

Don’t worry we wont go into language wars

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 3 / 11

Page 5: What makes Python So Awesome

Awesome Language

Name any Awesome language

Why is it awesome?

Don’t worry we wont go into language wars

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 3 / 11

Page 6: What makes Python So Awesome

History

Developed in early 90s by Guido van Rossum

Its Simple, Portable, Open Source and Powerfull

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 4 / 11

Page 7: What makes Python So Awesome

History

Developed in early 90s by Guido van Rossum

Its Simple, Portable, Open Source and Powerfull

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 4 / 11

Page 8: What makes Python So Awesome

History

Developed in early 90s by Guido van Rossum

Its Simple, Portable, Open Source and Powerfull

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 4 / 11

Page 9: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 10: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 11: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 12: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 13: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 14: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 15: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 16: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 17: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 18: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 19: What makes Python So Awesome

Who uses Python these days

Google

Youtube

Yahoo

NASA

Cisco

Disney

IBM

Nokia

Redhat

Sugar desktop environment

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 5 / 11

Page 20: What makes Python So Awesome

How far Python is from C/C++/Java

No pointers (Similar to Java) :-)

English-like-syntax

Interpreted (?)

Procedure (?) / Object-Oriented (?)

Very good for scripting

Includes garbage colector (?)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 6 / 11

Page 21: What makes Python So Awesome

How far Python is from C/C++/Java

No pointers (Similar to Java) :-)

English-like-syntax

Interpreted (?)

Procedure (?) / Object-Oriented (?)

Very good for scripting

Includes garbage colector (?)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 6 / 11

Page 22: What makes Python So Awesome

How far Python is from C/C++/Java

No pointers (Similar to Java) :-)

English-like-syntax

Interpreted (?)

Procedure (?) / Object-Oriented (?)

Very good for scripting

Includes garbage colector (?)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 6 / 11

Page 23: What makes Python So Awesome

How far Python is from C/C++/Java

No pointers (Similar to Java) :-)

English-like-syntax

Interpreted (?)

Procedure (?) / Object-Oriented (?)

Very good for scripting

Includes garbage colector (?)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 6 / 11

Page 24: What makes Python So Awesome

How far Python is from C/C++/Java

No pointers (Similar to Java) :-)

English-like-syntax

Interpreted (?)

Procedure (?) / Object-Oriented (?)

Very good for scripting

Includes garbage colector (?)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 6 / 11

Page 25: What makes Python So Awesome

How far Python is from C/C++/Java

No pointers (Similar to Java) :-)

English-like-syntax

Interpreted (?)

Procedure (?) / Object-Oriented (?)

Very good for scripting

Includes garbage colector (?)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 6 / 11

Page 26: What makes Python So Awesome

How far Python is from C/C++/Java

No pointers (Similar to Java) :-)

English-like-syntax

Interpreted (?)

Procedure (?) / Object-Oriented (?)

Very good for scripting

Includes garbage colector (?)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 6 / 11

Page 27: What makes Python So Awesome

Versions of Python

What do you mean by versions, Python is a language

Python as a language keeps on evolving and new features are beingadded to the language, here by versions we refer to the pythoninterpreter version, new features are added to python interpreter inevery release.

Important versions are Python 2.6/2.7 and Python 3.0/3.1

Currently focus only on Python 2.6/2.7

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 7 / 11

Page 28: What makes Python So Awesome

Versions of Python

What do you mean by versions, Python is a language

Python as a language keeps on evolving and new features are beingadded to the language, here by versions we refer to the pythoninterpreter version, new features are added to python interpreter inevery release.

Important versions are Python 2.6/2.7 and Python 3.0/3.1

Currently focus only on Python 2.6/2.7

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 7 / 11

Page 29: What makes Python So Awesome

Versions of Python

What do you mean by versions, Python is a language

Python as a language keeps on evolving and new features are beingadded to the language, here by versions we refer to the pythoninterpreter version, new features are added to python interpreter inevery release.

Important versions are Python 2.6/2.7 and Python 3.0/3.1

Currently focus only on Python 2.6/2.7

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 7 / 11

Page 30: What makes Python So Awesome

Versions of Python

What do you mean by versions, Python is a language

Python as a language keeps on evolving and new features are beingadded to the language, here by versions we refer to the pythoninterpreter version, new features are added to python interpreter inevery release.

Important versions are Python 2.6/2.7 and Python 3.0/3.1

Currently focus only on Python 2.6/2.7

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 7 / 11

Page 31: What makes Python So Awesome

Versions of Python

What do you mean by versions, Python is a language

Python as a language keeps on evolving and new features are beingadded to the language, here by versions we refer to the pythoninterpreter version, new features are added to python interpreter inevery release.

Important versions are Python 2.6/2.7 and Python 3.0/3.1

Currently focus only on Python 2.6/2.7

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 7 / 11

Page 32: What makes Python So Awesome

Language Basics

In Python indentation is very important

There are no end/begin delimiteres like { }Grouping of statements are done on basis of their indentation

Statements at same indentation are grouped together in a single block

# marks start of comment (single line)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 8 / 11

Page 33: What makes Python So Awesome

Language Basics

In Python indentation is very important

There are no end/begin delimiteres like { }Grouping of statements are done on basis of their indentation

Statements at same indentation are grouped together in a single block

# marks start of comment (single line)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 8 / 11

Page 34: What makes Python So Awesome

Language Basics

In Python indentation is very important

There are no end/begin delimiteres like { }

Grouping of statements are done on basis of their indentation

Statements at same indentation are grouped together in a single block

# marks start of comment (single line)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 8 / 11

Page 35: What makes Python So Awesome

Language Basics

In Python indentation is very important

There are no end/begin delimiteres like { }Grouping of statements are done on basis of their indentation

Statements at same indentation are grouped together in a single block

# marks start of comment (single line)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 8 / 11

Page 36: What makes Python So Awesome

Language Basics

In Python indentation is very important

There are no end/begin delimiteres like { }Grouping of statements are done on basis of their indentation

Statements at same indentation are grouped together in a single block

# marks start of comment (single line)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 8 / 11

Page 37: What makes Python So Awesome

Language Basics

In Python indentation is very important

There are no end/begin delimiteres like { }Grouping of statements are done on basis of their indentation

Statements at same indentation are grouped together in a single block

# marks start of comment (single line)

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 8 / 11

Page 38: What makes Python So Awesome

Lets code

Testing Python interpretor

Importing modules

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 9 / 11

Page 39: What makes Python So Awesome

Lets code

Testing Python interpretor

Importing modules

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 9 / 11

Page 40: What makes Python So Awesome

Lets code

Testing Python interpretor

Importing modules

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 9 / 11

Page 41: What makes Python So Awesome

Question and Answers

Please Ask Your doubts

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 10 / 11

Page 42: What makes Python So Awesome

Thank You!!!

Vikash (GTUG Manipal) Python - The informal way October 31, 2011 11 / 11