CoCalc Public Filestmp / 2016-08-04-111244.sagewsOpen in with one click!
Author: William A. Stein
def never_called(a): print 'should not execute 1', a # comment # comment print 'should not execute 2', a # comment - why red color BTW? print 'should not execute 3', a # comment - why red color BTW? print 'should not execute 4', a # comment - why red color BTW? print 'should not execute 5', a # comment at indent 0 print 'should not execute 6 BUT DOES', a
never_called('a')
should not execute 1 a should not execute 2 a should not execute 3 a should not execute 4 a should not execute 5 a should not execute 6 BUT DOES a
for i in range(1): pass 'x'
'x'
for i in range(1): pass 'x'
'x'
if True: pass "x"
'x'
if True: pass "x"
'x'
7\ %(2+3)
7
Error in lines 2-2 Traceback (most recent call last): File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 947, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 988, in execute_with_code_decorators code = code_decorator(code) TypeError: 'sage.rings.integer.Integer' object is not callable
help()

Welcome to Sage 6.10!

  • Online documentation: View the Sage documentation online.

  • Help: For help on any object or function, for example matrix_plot, enter matrix_plot? followed by tab or shift+enter. For help on any module (or object or function), for example, sage.matrix, enter help(sage.matrix).

  • Tab completion: Type obj followed by tab to see all completions of obj. To see all methods you may call on obj, type obj. followed by tab.

  • Source code: Enter matrix_plot?? followed by tab or shift+enter to look at the source code of matrix_plot.

  • License information: For license information about Sage and its components, enter license().