Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168742
Image: ubuntu2004
G = plot(x, -5, 5, thickness=5, color='green') P = polygon([[1,2], [5,6], [5,0]], color='red') G + P # show it
P+G
1/3 * 2/1
2/3
temp = 0 for i in range(1,11): print temp temp = temp+3+(1/3.0)
0 3.33333333333333 6.66666666666667 10.0000000000000 13.3333333333333 16.6666666666667 20.0000000000000 23.3333333333333 26.6666666666667 30.0000000000000
from turtle import * forward(30)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_6.py", line 10, in <module> exec compile(u"print _support_.syseval(python, u'from turtle import *\\nforward(30)', __SAGE_TMP_DIR__)" + '\n', '', 'single') File "", line 1, in <module> File "/sagenb/sage_install/sage-4.7/devel/rkirov-flask/sagenb/misc/support.py", line 473, in syseval return system.eval(cmd, sage_globals, locals = sage_globals) File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/misc/python.py", line 56, in eval eval(z, globals) File "", line 1, in <module> File "<string>", line 1, in forward File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 3715, in _getpen Turtle._pen = Turtle() File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 3704, in __init__ Turtle._screen = Screen() File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 3553, in Screen Turtle._screen = _Screen() File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 3569, in __init__ _Screen._root = self._root = _Root() File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 458, in __init__ TK.Tk.__init__(self) File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/Tkinter.py", line 1643, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable
33/10.0
3.30000000000000
plot(sin,-pi,pi)
from turtle import * forward(100)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_3.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZnJvbSB0dXJ0bGUgaW1wb3J0ICoKZm9yd2FyZCgxMDAp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpsdFaal/___code___.py", line 4, in <module> exec compile(u'forward(_sage_const_100 )' + '\n', '', 'single') File "", line 1, in <module> File "<string>", line 1, in forward File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 3715, in _getpen Turtle._pen = Turtle() File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 3704, in __init__ Turtle._screen = Screen() File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 3553, in Screen Turtle._screen = _Screen() File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 3569, in __init__ _Screen._root = self._root = _Root() File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/turtle.py", line 458, in __init__ TK.Tk.__init__(self) File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/lib-tk/Tkinter.py", line 1643, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable