Differences between revisions 7 and 13 (spanning 6 versions)
Revision 7 as of 2006-10-09 22:07:01
Size: 1384
Editor: anonymous
Comment:
Revision 13 as of 2006-10-09 22:59:54
Size: 1131
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Describe dmr/notebookwiki here. Copy cells from wiki-form window in sage worksheet and paste directly into wiki edit.
Line 5: Line 5:
{{{
code
code
///

{{{#!python
sage: a = 5
Line 11: Line 10:
################################################################################
# Worksheet: _scratch_
################################################################################
{{{#!python
sage: a
5}}}

{{{#!python
sage: for i in range(10):
... print i*i - 2
-2
-1
2
7
14
23
34
47
62
79}}}

{{{#!python
sage: c=0
sage: for i in range(20):
... a = 2^i -1
... if a.is_prime():
... print str(c + 1)+': '
... print a
1:
3
1:
7
1:
31
1:
127
1:
8191
1:
131071
1:
524287}}}

{{{#!python
sage: a.is_prime()
True}}}

{{{#!python

}}}
Line 16: Line 59:

{{{a = 5
{{{#!python
sage:
a = 5
Line 20: Line 63:
{{{a
# 5}}}
{{{#!python
sage:
a
5}}}
Line 23: Line 67:
{{{sage.server.notebook.worksheet.Cell.worksheet.im_class.files_html()
# Traceback (most recent call last):
    sage.server.notebook.worksheet.Cell.worksheet.im_class.files_html()
# File "/home/dorian/sage/sage-1.4/local/lib/python2.5/", line 1, in <module>
# TypeError: unbound method files_html() must be called with Cell instance as first argument (got nothing instead)}}}
{{{#!python
sage: sage.server.notebook.worksheet.Cell.worksheet.im_class.files_html()
Traceback (most recent call last):
...
TypeError: unbound method files_html() must be called with Cell instance as first argument (got nothing instead)}}}
Line 29: Line 73:
{{{_scratch___plain__
# Traceback (most recent call last):
    _scratch___plain__
# File "/home/dorian/sage/sage-1.4/local/lib/python2.5/", line 1, in <module>
#
NameError: name '_scratch___plain__' is not defined}}}
{{{#!python
sage:
_scratch___plain__
Traceback (most recent call last):
...
NameError: name '_scratch___plain__' is not defined}}}
Line 35: Line 79:
{{{#!python
sage: for i in range(10):
... print i*i - 2
-2
-1
2
7
14
23
34
47
62
79}}}
Line 36: Line 93:
{{{sage: a = 5 }}} {{{sage: a 5}}} {{{sage: sage.server.notebook.worksheet.Cell.worksheet.im_class.files_html() Traceback (most recent call last): ... TypeError: unbound method files_html() must be called with Cell instance as first argument (got nothing instead)}}} {{{sage: _scratch___plain__ Traceback (most recent call last): ... NameError: name '_scratch___plain__' is not defined}}} {{{sage: for i in range(10): ... print i*i - 2 -2 -1 2 7 14 23 34 47 62 79}}} {{{ }}} {{{#!python

}}}

Copy cells from wiki-form window in sage worksheet and paste directly into wiki edit.

   1 sage: a = 5

   1 sage: a
   2 5

   1 sage: for i in range(10):
   2 ...    print i*i - 2
   3 -2
   4 -1
   5 2
   6 7
   7 14
   8 23
   9 34
  10 47
  11 62
  12 79

   1 sage: c=0
   2 sage: for i in range(20):
   3 ...    a = 2^i -1
   4 ...    if a.is_prime():
   5 ...        print str(c + 1)+': '
   6 ...        print a
   7 1: 
   8 3
   9 1: 
  10 7
  11 1: 
  12 31
  13 1: 
  14 127
  15 1: 
  16 8191
  17 1: 
  18 131071
  19 1: 
  20 524287

   1 sage: a.is_prime()
   2 True

   1 

   1 sage: a = 5

   1 sage: a
   2 5

   1 sage: sage.server.notebook.worksheet.Cell.worksheet.im_class.files_html()
   2 Traceback (most recent call last):
   3 ...
   4 TypeError: unbound method files_html() must be called with Cell instance as first argument (got nothing instead)

   1 sage: _scratch___plain__
   2 Traceback (most recent call last):
   3 ...
   4 NameError: name '_scratch___plain__' is not defined

   1 sage: for i in range(10):
   2 ...    print i*i - 2
   3 -2
   4 -1
   5 2
   6 7
   7 14
   8 23
   9 34
  10 47
  11 62
  12 79

   1 

dmr/notebookwiki (last edited 2008-11-14 13:42:08 by anonymous)