Ask Your Question
0

Is there some import I need to do for defining variables?

asked 2015-05-01 02:50:24 -0500

Fusion809 gravatar image

I have been running Sage 6.6 through VirtualBox and whenever I define a variable I get an error, like for example (for a,b,c = var('a,b,c')):

File "<stdin>", line 1, in <module>
  File "_sage_input_25.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YSxiLGMgPSB2YXIo4oCZYSxiLGPigJkpCnFlID0gKGEqeF4yICsgYip4ICsgYyA9PSAwKQpwcmludCBzb2x2ZShxZSwgeCk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmpAUEAbf/___code___.py", line 3
    a,b,c = var(’a,b,c’)
                ^
SyntaxError: invalid syntax
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2015-05-01 04:21:41 -0500

eric_g gravatar image

It seems that the quotes delimiting the string 'a,b,c' are not correct (they appear to be slanted, while they should be vertical). They probably come from a cut-and-paste from e.g. a PDF document. Retry using your keyboard to type a,b,c = var('a,b,c').

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-01 02:50:24 -0500

Seen: 85 times

Last updated: May 01 '15