Beruflich Dokumente
Kultur Dokumente
Announcements
Reminder: In-Class Exercise 5 is due at 5pm on 10/2 (Friday).
o How many of you have completed the exercise?
o How many of you are part way?
o How many of you have not started?
o Any issues?
Starting Python Module today. You need to have completed Anaconda (Python 3.4) Installation:
o How many were able to do so on their personal laptops?
o How many had to resort to Citrix VM?
o Anybody who hasnt downloaded Anaconda yet?
* Per instruction on Blackboard under Course Content -> Week 6 -> Downloading and Installing Anaconda
Script Editor
Console
Python
https://docs.python.org/3.4/
Python Origins
Named after the show Monty Pythons Flying Circus
Originally created by Guido van Rossum as a hobby
Now supported by the open source community
https://en.wikipedia.org/wiki/Monty_Python
Compiler
Machine
Code
Real
Machine
Performance
Interpreter
(VM)
Debuggability
Intermediat
e Language
(Byte Code)
(Interpreter
) VM
Portability
Intermediat
e Language
(Byte Code)
(Interpreter
) VM
High Level
Language
High Level
Language
High Level
Language
Compiler
Compiler
Reference: http://www.i-programmer.info/babbages-bag/352-
JIT
Machine
Code
Programming
Language
Python: Language vs
Implementation
Implementation
Execution
CPython or
Python
(C)
Python
Source
Code
IronPython
(C#)
Python
Source
Code
Jython
(Java)
Python
Source
Code
CPython
Compiler
Bytecode
(.pyc*)
CPython
VM
Bytecode
CLR VM
Bytecode
JVM
Python
Jython
Compiler
Reference: http://www.toptal.com/python/why-are-there-so-
follow along!
Variables
follow along!
Operator Precedence
Best to just use brackets () to disambiguate!
Operator precedence in Python, from lowest precedence (least binding) to highest precedence
(most binding). Operators in the same box have the same precedence. Operators in the same box
group left to right (except for comparisons, including tests, which all have the same precedence and
chain from left to right and exponentiation, which groups from right to left).
or
2*3+5
and
not
in, not in, is, is not, <, <=, >, >=, !=, ==
|
^
&
<<, >>
+, *, /, //, %
+x, -x, ~x
**
2 * 3 ** 4