[Tutor] I think I'm getting ahead of myself

Steven Gilmore Steven Gilmore" <srGilmore@sprintmail.com
Thu, 20 Jul 2000 19:31:03 -0400

 I am reading "How to Think like a Computer Scientist".  I can only get half
of the examples to work.  Like the recursive example below:

def countdown(n):
    if n == 0:
       print "Blastoff!"
       print n

  I'm saving the script in a sub directory of the python directory.  I'm
using Windows. I tried adding the directory to the path with

>>> import sys

then I run the script in IDLE

>>> import test
>>> countdown(3)
Traceback (innermost last):
  File "<pyshell#4>", line 1, in ?
NameError: countdown

what's the deal?

Steven Gilmore