Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
11 Cards in this Set
- Front
- Back
Operators esp. exponent and remainder
|
+ Addition 4+5
- Subtraction 8-5 * Multiplication 4*5 / Division 19/3 % Remainder 19%3 ** Exponent 2**4 16 |
|
Comments
|
#
|
|
Lists
|
Modifiable
cats = ['Tom', 'Snappy', 'Kitty', 'Jessie', 'Chester'] cats.append('Catherine') del cats[1] |
|
Dictionaries
|
Keys, and values
phonebook = {'Andrew Parson':8806336, \ 'Emily Everett':6784346, 'Peter Power':7658344} phonebook['Gingerbread Man'] = 123456 del phonebook['Andrew Parson'] |
|
Tuples
|
Python organises those values in a handy, numbered index - starting from zero
months = ('January','February','March','April') |
|
'while' loop
|
a = 0
while a < 10: a = a + 1 print a |
|
make/run a program
|
open IDLE, click File > New Window, type your program in the new window, then press F5 to run
|
|
Conditionals
|
MUST have a colon :
if {conditions}: {run this code} elif {conditions}: {run this code} elif {conditions}: {run this code} else: {run this code} |
|
IDLE
|
stands for Integrated DeveLopment Environment for Python, which provides both an interpreter shell and a file editor (all platforms)
|
|
Mayavi
|
an application for 3-D data visualization based on the VTK engine, with an embedded Python shell
|
|
PyLab
|
a mode of the IPython enhanced interactive interpreter shell, which adds support for plotting.
IPython has two main components: * An enhanced interactive Python shell. * An architecture for interactive parallel computing. |