ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 27 Sep 2017 00:35:25 +0200How converting some number of different base to 10 to base 10?https://ask.sagemath.org/question/38979/how-converting-some-number-of-different-base-to-10-to-base-10/Hello, how can I convert some number into different base at 10, to the base 10 in Sage?
For example: convert ( EAEI in base 36 ) = 666666 into base 10.
In advance thank you very much for your help.
Best regardsTue, 26 Sep 2017 22:55:16 +0200https://ask.sagemath.org/question/38979/how-converting-some-number-of-different-base-to-10-to-base-10/Answer by slelievre for <p>Hello, how can I convert some number into different base at 10, to the base 10 in Sage?
For example: convert ( EAEI in base 36 ) = 666666 into base 10.
In advance thank you very much for your help.
Best regards</p>
https://ask.sagemath.org/question/38979/how-converting-some-number-of-different-base-to-10-to-base-10/?answer=38980#post-id-38980To get a Python int, do this:
sage: int('EAEI', base=36)
666666
To get a Sage Integer, do this:
sage: Integer('EAEI', base=36)
666666
Wed, 27 Sep 2017 00:35:25 +0200https://ask.sagemath.org/question/38979/how-converting-some-number-of-different-base-to-10-to-base-10/?answer=38980#post-id-38980