Jupyter Interactive Widget not executing properly
问题 I am using jupyte notebook This is the Code from ipywidgets import interact define a function to work with (cubes the number) def myfunction(arg): return arg+1 interact(myfunction, arg=9); The result showing is 10 instead it should be showing a slider Showing: enter image description here Instead it show: enter image description here 回答1: I can't tell exactly what went wrong with what you did because there are formatting issues with your post -- you need to indent the code 4 spaces when you