Jupyter – ipython

Source: http://ipywidgets.readthedocs.io/en/latest/examples/Using%20Interact.html

Ipython/ Jupyter – Interactive Functions Introduction

Imports

from __future__ import print_function
from ipywidgets import interact, interactive, fixed
import ipywidgets as widgets

Function

f = lambda x: return x

Form

interact(f, x=10);

How to set a default values and a range?

def f(x=80): return x

interact(f, x=(0, 100, 0.5);