# [sage-support] Re: How does @interact work in Sage 7.3 Jupiter notebook?

```This post <https://groups.google.com/forum/#!topic/sage-support/RK9eBs-xbjE>
might help... Note that this solution is different of Sage's (@)interact
function(s).```
```
HTH,

--
Emmanuel Charpentier

Le mardi 13 septembre 2016 03:36:19 UTC+2, ahaus...@umassd.edu a écrit :
>
> Hi,
>
> the Interact command does not seem to be working in Sage 7.3 Jupyer
> Notebook!
>
>
> Here is the code from a notebook cell:
> -----------------------------------------------------------------
> from ipywidgets import interact, interactive, fixed
> import ipywidgets as widgets
>
>
> def plotNthRoots(n):
>     # Create a unit circle
>     c = circle((0,0), radius=1, rgbcolor=(1,0,0))
>     # Combine the circle with points on the circle representing the roots
> of unity
>     theta = 2.0*pi/float(n)
>     p = c + point([(cos(t), sin(t)) for t in srange(0, 2.0*pi,
> theta)],frame=True,size=60)
>     # Add in vectors from the origin to the roots of unity.
>     p = p + sum([arrow2d( (0,0), (cos(t),sin(t)) ) for t in srange(0,
> 2.0*pi, theta)])
>     show(p)
>     print("The Principle %d-Root: (%5.3f)+(%5.3f)I"%(n,cos(theta),
> sin(theta)) )
>
>
> @interact
> def _(n=(1,20)):
>     plotNthRoots(n)
> ---------------------------------------------------------
>
> Rather than creating a slider, it generates a plot for the case n=20.
>
> Any suggestions?
>