SharedJupyterWidgets / SageInteract.sagewsOpen in CoCalc

1. Simple Sage interact

@interact
def _(
    n = slider(1,10, step_size =1, label="Select a number:")):
    print n
Interact: please open in CoCalc

2. Simple Sage graph interact

@interact
def _(
    m = slider(-2,2, step_size =0.5),
    b = slider(-3,3, step_size =0.5)):
    show(plot(m*x+b,(x,-10,10), ymax = -5, ymin= 5, color ='blue', figsize=(8,5)))
Interact: please open in CoCalc