Friday, December 7, 2007

simplicity



Levitation aside, there is a vocabulary test engine called Lavengro that is written in Python (one you can use, in other words, to build your own vocabulary tests); I started learning Python months ago and then something came up, but I'd like to go back to it.

1 comment:

David Seruyange said...

#Because I like Helen
class factStore:
def __init__(self):
self.f = [1]
def __call__(self, n):
if n == 1:return 1
if(n > len(self.f)):
for i in range(len(self.f), n+1):
self.f.append(i * self.f[i -1])
return self.f[n]

f = factStore()
print f(4)
print f(3)
print f(6)