1 # To start using reinteract, type a Python expression, and hit
2 # <Control>Return to calculate. (This example is already calculated
3 # when it was loaded, but try modifying the statement below and
4 # then hit <Control>Return again to calculate it)
7 # You can assign and use variables
12 # As above, the default action when an expression returns a result
13 # other than N is to display it. You can also use 'print' explicitly
14 print "Hello", "World"
16 # Try modifying the value of a; you'll see that when you hit
17 # control-return, the value of a + 3 is updated as well.
19 # You can define functions
28 # And use constructs like for loops and if statements
30 print "%d: %d" % (i + 1, fact(i + 1))