Thursday, 6 March 2008

Conditions (if) and indenting

>>> world_flat=1
>>> if world_flat:
... print "You can fall off!" #this line is indented
...
You can fall off!

Config stuff for Unix and Windows machines

Usual location of the interpreter:
/usr/local/bin/python (Unix)
C:\Python25 or sth similar (Windows)

Environment path setting (Windows)
set path path=%path%;C:\python25


Saturday, 1 March 2008

Drill #1

# <-comment
>>> a = 4 #assignment
>>> if a%2==0: #condition
print "whatever"