| 1 | initial version |
I suspect it is some python idiosyncrasy. It is somehow not getting the variable n as defined in the function declaration. The following works (for some reason using n=n again didn't work, probably because n is defined globally to be some function):
def T(n):
top = ceil(math.sqrt(n))
print top
@interact
def _(k=6739815371):
T(k)
k = k
timeit('T(k)')
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.