research

= =

Home

=**Python Research Notes**=

This is my draft notes for building this wiki. If you are reading this now, then the site is not yet done :)

-how to make executable in mac/unix/linux? > (http://docs.python.org/tutorial/interpreter.html)
 * start script with "#! /usr/bin/env python"
 * for windows, no notion of "executable mode", is automatically associated

-do not need to explicitly declare variables. Good practise is to define anyway so use comments, #length: used for length

Need places for: >> name[:2] is first 2, name[-1] is last >> name[1:2] is second and third letters etc, provide more examples >> (iterates over sequence of items (a string, list) in the order they appear, see 4.2 for important details)
 * Integers
 * math with integers yields floor value (10/3 = 3, 10/-3=4)
 * Real
 * either value needs to be real (10.0/3 | 10/3.0 = 3.3333333333333335)
 * Strings
 * once created cannot change, must create another
 * first index is zero, name[0]
 * stuff about thinking of the vertices as pointing in between the characters (provide pic from 3.1.2)
 * Lists
 * unlike strings, can change items of a list
 * very much need to understand vertices as pointing in between list items (see strings)
 * provide more stuff from 3.1.4
 * Loops
 * if: elif: else
 * for x in a:
 * Range:
 * If you need to iterate over a sequence of numbers, this built-in function will generate lists containing arithmetic progressions (see 4.3)
 * Break, Continue, Else
 * exit a loop, continue the next iteration of a loop, after all else fails
 * Defining Functions
 * def whatever(n): (see 4.6)
 * Comments
 * start line with "#" or group by starting with "/*" and ending with "*/"

-how to make executable || Officially why no Case statement: http://www.python.org/dev/peps/pep-0275/
 * Key Area to be included in Wiki || Placement order || Additional Notes ||
 * obtain/install || 0 || -where/how to install, best to use a text editor over interpreter-include why
 * obtain/install || 0 || -where/how to install, best to use a text editor over interpreter-include why
 * Comments || 1 ||  ||
 * First Program || 2-with print ||  ||
 * Printing || 2-with first prog ||  ||
 * Declaring Variables || 3-data types ||  ||
 * Assigning Values || 3-with variables ||  ||
 * Variables || 4 ||  ||
 * Operators || 5-nut-p50 ||  ||
 * Arrays || 6-strings ||  ||
 * If-Else || 7 ||  ||
 * For Loops || 8 ||  ||
 * While Loops || 9 ||  ||
 * Select Case || 10 || N/A

see also http://bytebaker.com/2008/11/03/switch-case-statement-in-python/ http://pyfaq.infogami.com/why-isn-t-there-a-switch-or-case-statement-in-python ||
 * Built-in Functions || 11-range ||  ||
 * Functions || 12 ||  ||
 * Files || 13-with I/O ||  ||
 * Input & Output || 13-with Files ||  ||
 * Sorting || 14 ||  ||
 * Searching || ??? ||  ||
 * Sound || XX ||  ||