python
TRANSCRIPT
![Page 1: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/1.jpg)
H P
M.Gebreel
DevMix
![Page 2: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/2.jpg)
Minute of silence
:((
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 3: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/3.jpg)
Introduction
to
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 4: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/4.jpg)
Python ??!!
what is that ??
All copyrights reserved for M. Gebreel(Harry Potter)All copyrights reserved for M. Gebreel(Harry Potter)
![Page 5: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/5.jpg)
Is this ??!!
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 6: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/6.jpg)
I am afraid
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 7: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/7.jpg)
No absolutely no
:D :D
![Page 8: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/8.jpg)
Simply programming language
Scripting Language
Interpreted
Object-oriented
high-level programming language
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 9: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/9.jpg)
Python
Not named after This man …...
Guido van Rossum
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 10: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/10.jpg)
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 11: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/11.jpg)
At Anyway
Why python ??
What will make me learn it ??
Or
Why I love python :D :D ??All copyrights reserved for M. Gebreel(Harry Potter)
![Page 12: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/12.jpg)
Really love it
![Page 13: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/13.jpg)
Python is powerful... and fast#batteries included #ur web server in 3 lines
Python plays well with others#(Jpython)Python for the Java Virtual Machine# (Ironpython)Python for .NET Python runs everywhere
Python is friendly... and easy to learn
Python is Open
Answer is here
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 14: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/14.jpg)
Hello world
Python 2.7
Print “ hello world”Python 3.1
Print (“hello world”)
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 15: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/15.jpg)
The interactive interpreter
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 16: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/16.jpg)
Data types
Strings Int bool float (only one real type) complex files
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 17: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/17.jpg)
Attention plz
Python speaks now :
Do not tire yourself by writing type of the object
I will know it by myself ;)
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 18: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/18.jpg)
Everything is an Object
>>> x = 'hello, world'>>> y = x.upper()>>> y'HELLO, WORLD!'
>>> import calendar>>> cal = calendar>>> print cal.month(2007,10)
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 19: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/19.jpg)
Unusual Suspectslong — automatic promotion from int if needed
>>> x = 1024>>> x ** 50
32733906078961418700131896968275991521
6642046043064789483291368096133796404674554883270092325904157150886684127560071009217256545885393053328527589376L All copyrights reserved for M. Gebreel(Harry Potter)
![Page 20: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/20.jpg)
Built-in data structures
Tuples – Fixed Length(1, 2, 3, “Hello”, False)
Lists[1, 2, 4, “Hello”, False]
Dictionaries{42: “The answer”, “key”: “value”}
Setsset([“list”, “of”, “values”])
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 21: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/21.jpg)
FunctionsPython uses whitespace to determine blocks of code (please don't use tabs)
EX:def greet(person):
if person == “Tim”: print “Hello Master” else: print “Hello %s” % person
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 22: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/22.jpg)
Classes
class MyClass: """This is a docstring.""" name = "Eric" def say(self): return "My name is %s" %
self.nameinstance = MyClass()print instance.say()
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 23: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/23.jpg)
Modules
Any python file is considered a module
Modules are loaded from the PYTHONPATH
All copyrights reserved for M. Gebreel(Harry Potter)
![Page 24: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/24.jpg)
Exceptions
Also used for flow control – StopIterationExceptions are classes, and custom
exceptions are easy to write to store extra state
informationEX:
try: # Do stuff
except Exception, e: # Do something elseAll copyrights reserved for M. Gebreel(Harry Potter)
![Page 25: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/25.jpg)
Stop !!!!Wanna more ;)
Check Out These Links
http://docs.python.org/tut/tut.html - The Python Tutorialhttp://diveintopython.org/index.html - Dive Into Pythonhttp://www.garshol.priv.no/download/text/perl.html -
Detailed Story of One Perl Hacker's Migration to Pythonhttp://www.linuxjournal.com/article/3882 - Eric Raymond's
Detailed Story and Praise for Pythonhttp://www.pythonmagazine.com - Python Magazinehttp://www.planetpython.org - Python blog aggregation
site All copyrights reserved for M. Gebreel(Harry Potter)
![Page 26: Python](https://reader036.vdocuments.site/reader036/viewer/2022062513/555a6015d8b42ae7218b4690/html5/thumbnails/26.jpg)
Questions?
All copyrights reserved for M. Gebreel(Harry Potter)