Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A confusing syntax error when using elif

Dear All

This is my confusing problem:

sage: m=31
sage: if m%3==0:
....:     print m/3
....:     elif m%3==1:
....:         print (m-1)/3
File "<ipython-input-2-ec9f38b42615>", line 3
  elif m%Integer(3)==Integer(1):
SyntaxError: invalid syntax


I do not copy-paste the code. I have ubuntu14.04 and my sage version is 6.5.