Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168729
Image: ubuntu2004
a=[] for i in range(40): a.append(factorial(i)) print a
[1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000, 51090942171709440000, 1124000727777607680000, 25852016738884976640000, 620448401733239439360000, 15511210043330985984000000, 403291461126605635584000000, 10888869450418352160768000000, 304888344611713860501504000000, 8841761993739701954543616000000, 265252859812191058636308480000000, 8222838654177922817725562880000000, 263130836933693530167218012160000000, 8683317618811886495518194401280000000, 295232799039604140847618609643520000000, 10333147966386144929666651337523200000000, 371993326789901217467999448150835200000000, 13763753091226345046315979581580902400000000, 523022617466601111760007224100074291200000000, 20397882081197443358640281739902897356800000000]
a = animate([circle((i,1+abs(3*sin(i))), 1) for i in srange(0,10,0.1)], xmin=-1,ymin=0,xmax=11,ymax=5, figsize=[12,5]) show(a)
a[] for i in range(10) a.append ((circle((i,1+abs(3*sin(i))), 1), xmin=-1,ymin=0,xmax=11,ymax=5) print a
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_33.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YVtdCmZvciBpIGluIHJhbmdlKDEwKQogICAgYS5hcHBlbmQgKChjaXJjbGUoKGksMSthYnMoMypzaW4oaSkpKSwgMSksIHhtaW49LTEseW1pbj0wLHhtYXg9MTEseW1heD01KQpwcmludCBh"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpW6S9qe/___code___.py", line 3 a[] ^ SyntaxError: invalid syntax
list_plot([2*pi*0.99*i for i in range(151)])
list_plot([sin(2*pi*t) for t in srange(0.99*n, sin(2*pi*0.99*n)) for n in range (151)])
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_50.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("bGlzdF9wbG90KFtzaW4oMipwaSp0KSBmb3IgdCBpbiBzcmFuZ2UoMC45OSpuLCBzaW4oMipwaSowLjk5Km4pKSBmb3IgbiBpbiByYW5nZSAoMTUxKV0p"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpQ3bnlL/___code___.py", line 3, in <module> exec compile(u'list_plot([sin(_sage_const_2 *pi*t) for t in srange(_sage_const_0p99 *n, sin(_sage_const_2 *pi*_sage_const_0p99 *n)) for n in range (_sage_const_151 )])' + '\n', '', 'single') File "", line 1, in <module> File "element.pyx", line 1467, in sage.structure.element.RingElement.__mul__ (sage/structure/element.c:12217) File "coerce.pyx", line 795, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:7489) TypeError: unsupported operand parent(s) for '*': 'Real Field with 53 bits of precision' and '<type 'function'>'