[Tutor] recursion program

reavey reavey@nep.net
12 Oct 2002 08:31:00 -0400


I ran into this beauty in How to think like a computer scientist chapter
4
def countdown(n):
	if n == 0:
		print "BLASTOFF!"
	else:
		print n
	countdown(n-1)
indentation is probably wrong, I use idle and let it do the work

question:
I would like to call a sound effect say from
/usr/share/sounds/KDE_Beep_Lightning.wav when n == 0
How?
I would also like the countdown to be in real time, how?

TIA
mike Reavey