On 08/11/2011 16:52, Chappman wrote:
Hi folks,
When I try and do to two arguments in the same lines in sagemath it
does not compute, this is what I have written:
if A==1 and D==1 then case<- 1 else
if A==2 and D==1 then case<- 2
Hi
This is not the correct syntax for an if statement in Python. You
should replace "then" by a ":". Also <- does not do an assignment,
which I think is what you're trying to do. I think what you want is
if A==1 and D==1: case=1
elif A==2 and D==1: case=2
HTH
Alastair
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org