There is a mechanism built for Jupyter to gather input from the user as the script is running. To do this, we put in coding in the form of a widget or user interface control in the script. The widgets we will use in this chapter are defined at http://ipywidgets.readthedocs.io/en/latest/ .
There are widgets for the following:
Text input: Notebook users enter a string that will be used later in the script.
Button clicks: The user is presented with multiple options in the form of buttons; then, depending on which button is selected (clicked on), your script can change direction according to the user.
Slider: You can provide the user with a slider with which the user can select a value within the range you specify, and then your script can use that value accordingly.
Toggle box and checkboxes: The user selects the different options of your script that they are interested in working with.
Progress bar: If your script will take some time to process, it would...