In [1]:
9 * 9
Out[1]:
In [2]:
def f(x):
print(x * x)
In [3]:
f(9)
In [4]:
from ipywidgets import *
from traitlets import dlink
In [5]:
interact(f, x=(0, 100));
In [6]:
slider = FloatSlider(
value=7.5,
min=5.0,
max=10.0,
step=0.1,
description='Input:',
)
slider
In [7]:
slider
In [8]:
slider.value
Out[8]:
In [9]:
text = FloatText(description='Value')
dlink((slider, 'value'), (text, 'value'))
text
In [10]:
slider
Widgets are represented in the back-end by a single object. Each time a widget is displayed, a new representation of that same object is created in the front-end. These representations are called views.
In [ ]: