{ "metadata": { "name": "", "signature": "sha256:2cfbcf7c7331659db47d2ca73ac790d9d6baa73029c682af6eb4424552ab02d0" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Static Interactive Notebook\n", "\n", "This notebook shows a few examples of what's possible with the static widgets" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1: Simple Text output" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from ipywidgets import StaticInteract, RangeWidget, RadioWidget\n", "\n", "def multiply(a, b):\n", " return \"{0} * {1} = {2}\".format(a, b, a * b)\n", "\n", "StaticInteract(multiply,\n", " a=RangeWidget(0, 10),\n", " b=RangeWidget(0, 10),)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "\n", " \n", " \n", "
0 * 0 = 0
\n", "0 * 0 = 0 apples
\n", "