I am trying to learn basic Sage functionality and need a bit of
coaching.  Here is one example that I have not been able to figure
out.  This is all being done within a Notebook.

x,y = var('x, y');
A = x+y == 3;
bool(A.substitute(x=1,y=2))

returns "True", but

x,y = var('x, y');
A = x+y == 3;
if bool(A.substitute(x=1,y=2)): print "Yes" else: print "No"

gives me an error message.  So does

x,y = var('x, y');
A = x+y == 3;
if A.substitute(x=1,y=2): print "Yes" else: print "No"

so... what is the right way to get this conditional to function?

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to