* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Python
Reactive programming wikipedia , lookup
Falcon (programming language) wikipedia , lookup
Join-pattern wikipedia , lookup
Programming language wikipedia , lookup
Resource management (computing) wikipedia , lookup
String literal wikipedia , lookup
Functional programming wikipedia , lookup
C Sharp (programming language) wikipedia , lookup
Corecursion wikipedia , lookup
Go (programming language) wikipedia , lookup
Object-oriented programming wikipedia , lookup
Structured programming wikipedia , lookup
By: Ben Hester
What is Python
Powerful Dynamic Programming Language
Uses Whitespace
Everything Is A Object
Very Portable
History of Python
Created By Guido Van Rossum
An improvement on ABC
Open Source and Community Supported
Basics
Case Sensitive
Unlimited Integers
Arrays can contain elements of different types
Arrays can be broken into slices
Can be expanded with C or C++
No GOTO
Control Structures
Supports Nested If- Statements
Does NOT support Switch Statements
Has a different way of doing FOR loops
Default FOR loop
Works similar to a For-Each loop
Ex:
for w in "Cat":
print(w)
OUTPUT :
C
a
t
FOR Loops
Java
for(int i = 5; i < 10; i++)
System.out.printf("%d\n", i);
OUTPUT:
5
6
7
8
9
Python
for i in range(5, 10):
print(i)
OUTPUT:
5
6
7
8
9
If it looks like a duck….
Duck Typing
Python is a Dynamically Typed Language
Duck Typing is a subset of dynamic typing
In Python, methods don’t care what is passed as long as it works
Subprograms
Every function in Python returns a value
Supports keyword parameters
Allows for nested subprograms
Concurrency
Python supports concurrency
Since Python is interpreted, it can only handle logical
concurrency
Error and Event Handling
Extensive Exception handling features
Users can create their own errors through class objects
Python doesn’t have native event handlers
Sources
Beazley, David. "An Introduction to Python Concurrency." An Introduction to Python
Concurrency. USENIX Technical Conference, June 2009. Web. 20 Nov. 2012.
<http://www.slideshare.net/dabeaz/an-introduction-to-python-concurrency>.
"Learnpython.org." Learn Python. Learnpython.org, n.d. Web. 01 Oct. 2012.
<http://www.learnpython.org/>.
Lott, Steven. "Python - Raising Exceptions." Python - Raising Exceptions. Linuxtopia.org, 2002.
Web. 20 Nov. 2012.
<http://www.linuxtopia.org/online_books/programming_books/python_programming/pytho
n_ch17s03.html>.
"Python V3.3.0 Documentation." Overview. Python Software Foundation, n.d. Web. 01 Oct.
2012. <http://docs.python.org/py3k/>.
Sebesta, Robert W. Concepts of Programming Languages. Boston: Pearson, 2012. Print.
Shaw, Zed A. "Learn Python The Hard Way, 2nd Edition." Learn Python The Hard Way, 2nd
Edition â€
”Learn Python The Hard Way, 2nd Edition. N.p., n.d. Web. 01 Oct. 2012.
<http://learnpythonthehardway.org/book/>.
Swaroop, CH. A Byte of Python. Vol. 1.9. N.p.: n.p., 2008. Print.
Vrajitoru, Dana. "C311 Name, Scope, Binding." C311 Name, Scope, Binding. IUSB, n.d. Web. 01
Oct. 2012. <http://www.cs.iusb.edu/~danav/teach/c311/c311_3_scope.html>.