p3

190 days ago by reimondhill

@interact(layout={'top': [['a', 'b']]}) def _(a=2, b=(0..20)): print a+b 
       

Click to the left again to hide and once more to show the dynamic interactive window

 
       
 
       
 
       
 
       
 
       
 
       
G.automorphism_group() 
       
Traceback (click to the left of this block for traceback)
...
NameError: name 'G' is not defined
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_10.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Ry5hdXRvbW9ycGhpc21fZ3JvdXAoKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpRtuEj3/___code___.py", line 2, in <module>
    exec compile(u'G.automorphism_group()
  File "", line 1, in <module>
    
NameError: name 'G' is not defined
help(interact) 
       
@interact def _(a=(0,2)): show(plot(sin(x*(1+a*x)), (x,0,6)), figsize=4) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact(layout={'top': [['a', 'b']], 'left': [['c']], 'bottom': [['d']]}) def _(a=x^2, b=(0..20), c=100, d=x+1): print a+b+c+d 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact (layout={'left':[['a']], 'right':[['b']]}) def _(a=(0..20),b=(0..2)): print a*b 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact(layout={'top': [['a', 'b']]}) def _(a=2, b=(0..20)): print a+b 
       

Click to the left again to hide and once more to show the dynamic interactive window