Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Difference of comportment between notebook and Sagecell

This command has not the same result in Sage Cells and in a notebook of sagemath 9.2. The first is the good one.

@interact(layout={'top': [['ABCD','ABDC','ACBD','ADBC','EFGH'],['BACD','BADC','BCAD','BCDA','GEFH']]})
def _(ABCD=0, ABDC=0, ACBD=0,ADBC=0,BACD=0,BADC=0,BCAD=0,BCDA=0,EFGH=0,GEFH=0): 
    print(ABCD+ABDC+ACBD+ACBD)

A connex question

@interact(layout={'top': [['ABCD','ABDC','ACBD','ADBC','EFGH'],['BACD','BADC','BCAD','BCDA','GEFH']]})
def _(ABCD=0, ABDC=0, ACBD=0,ADBC=0,BACD=0,BADC=0,BCAD=0,BCDA=0,EFGH=0,GEFH=0): 
    A = list([ABCD,ACBD,ADBC,EFGH,BACD,BADC,BCAD,BCDA,GEFH])
    return A


add(_())

evaluate to 0 without waiting for input. Why ? and how to obtain the good behaviour ?