Ask Your Question

Newton's profile - activity

2024-03-09 03:39:16 +0200 received badge  Famous Question (source)
2024-03-09 03:39:16 +0200 received badge  Notable Question (source)
2021-01-03 15:11:08 +0200 received badge  Popular Question (source)
2019-06-04 20:31:42 +0200 received badge  Teacher (source)
2019-06-04 20:31:42 +0200 received badge  Self-Learner (source)
2019-06-04 13:04:40 +0200 commented answer integer digits range problem (see sage error below) Thanks!!!

Thanks! That makes sense now.

2019-06-04 10:33:49 +0200 received badge  Student (source)
2019-06-04 10:02:10 +0200 answered a question integer digits range problem (see sage error below) Thanks!!!

replace range with srange and it works in sage math for windows 8.7

2019-06-04 10:02:09 +0200 commented question integer digits range problem (see sage error below) Thanks!!!

Too bad I need 60 points to post a png file which is much more readable than the cut and paste from the latest sage math (8.7 I believe) for windows.. I'm running windows 7. For some reason, for i in [9,10,11]: i.digits(base=3) Works Jusf Fine However; for i in range(9,12): i.digits(base=3) Raises an Error Thanks William Stein and all others involved in the development for the free software. Love Sage Math, Sage Math Cell, and Python!!!

2019-06-04 10:02:09 +0200 asked a question 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