Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage's interacts are a Sage-specific-customization of ipywidgets.interact. Their behavior is, as far as I know, documented only for the Jupyter notebook.

Ran in a 9.3.beta5 notebook, your code gives the expected result. Ran in sagecell, the presentation is cosmetically duifferent (you get number cells instead of sliders), but the result is the same (i. e. ABCD+ABDC+2*ACBD).

What did you expect exactly ?

Second question : an interact does not wait for input : it paints and activates controls, comutes the result as a functin of the (default) values of these inputs and returns it. Whenever one of the inputs changes as a result of an end-user action, the resulting value is recomputed and returned. Mos common case : the return value is a graphic, which is redisplayed.

All of this is documented and tutorialized.

sage: r.library("fortunes")                                                     
sage: r.fortune("'WTFM'")                                                       

This is all documented in TFM. Those who WTFM don't want to have to WTFM again
on the mailing list. RTFM.
   -- Barry Rowlingson
      R-help (October 2003)