Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

integer digits range problem (see sage error below) Thanks!!!

sage: for i in [9,10,11]: ....: i.digits(base=3) ....: [0, 0, 1] [1, 0, 1] [2, 0, 1] sage: for i in range(9,12): ....: i.digits(base=3)

....:

AttributeError Traceback (most recent call last) <ipython-input-2-e5aab74726b7> in <module>() 1 for i in range(Integer(9),Integer(12)): ----> 2 i.digits(base=Integer(3)) 3

AttributeError: 'int' object has no attribute 'digits' sage: [9,10,11]==range(9,12) True

integer digits range problem (see sage error below) Thanks!!!

sage: for i in [9,10,11]: ....: i.digits(base=3) ....: [0, 0, 1] [1, 0, 1] [2, 0, 1] sage: for i in range(9,12): ....: i.digits(base=3)

....:

i.digits(base=3) ....: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-2-e5aab74726b7> in <module>() 1 for i in range(Integer(9),Integer(12)): ----> 2 i.digits(base=Integer(3)) 3

AttributeError: 'int' object has no attribute 'digits'
sage: [9,10,11]==range(9,12)
True

True

integer digits range problem (see sage error below) Thanks!!!

.

sage: for i in [9,10,11]:
 ....:     i.digits(base=3)
 ....:
 [0, 0, 1]
 [1, 0, 1]
 [2, 0, 1]
 sage: for i in range(9,12):
 ....:     i.digits(base=3)
 ....:
 ---------------------------------------------------------------------------
 AttributeError                            Traceback (most recent call last)
 <ipython-input-2-e5aab74726b7> in <module>()
       1 for i in range(Integer(9),Integer(12)):
 ----> 2     i.digits(base=Integer(3))
          3

3
AttributeError: 'int' object has no attribute 'digits'
sage: [9,10,11]==range(9,12)
True