Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168737
Image: ubuntu2004
def m(i,j): if (i == 0 and (j == 1998 or j == 1999)): return 1 else: if (i > 0 and j == i-1): return 1 else: return 0
t = Matrix(Integers(20092010),2000,2000,m)
k = t^(10^18)
sum(k.row(-1))
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("c3VtKGsucm93KC0xKSk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpoaLgSF/___code___.py", line 3, in <module> exec compile(u'sum(k.row(-_sage_const_1 ))' + '\n', '', 'single') File "", line 1, in <module> NameError: name 'k' is not defined