| 1 | initial version |
You can try with global variables, something like:
Cell 1
a = 3
Cell 2
@interact(n=a)
def square(n):
global a1
print("{} squared is {}".format(n, n*n))
a1 = n
Cell 3
a1
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.