Python Integers: Difference between revisions
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[Python_Language#Integers|Python Language]] | * [[Python_Language#Integers|Python Language]] | ||
=TODO= | |||
<font color=darkkhaki> | |||
* TO PROCESS [[IPy]] [[Python_Integers#Bases]] | |||
</font> | |||
=Overview= | =Overview= | ||
Whole numbers, expressed as numeric constants that do not contain a decimal point. | Whole numbers, expressed as numeric constants that do not contain a decimal point. | ||
Line 8: | Line 13: | ||
<class 'int'> | <class 'int'> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
In Python 2, an integer was limited to 32 bits. In Python 3, integers can arbitrarily large: | |||
<syntaxhighlight lang='py'> | |||
>>> googol = 10**100 | |||
>>> googol | |||
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | |||
</syntaxhighlight> | |||
=Bases= | =Bases= | ||
<font color=darkkhaki>[[IPy]] Bases Page 26.</font> | <font color=darkkhaki>[[IPy]] Bases Page 26.</font> | ||
=Organizatorium= |
Latest revision as of 23:23, 15 May 2024
Internal
TODO
- TO PROCESS IPy Python_Integers#Bases
Overview
Whole numbers, expressed as numeric constants that do not contain a decimal point.
x = -20
type(x)
<class 'int'>
In Python 2, an integer was limited to 32 bits. In Python 3, integers can arbitrarily large:
>>> googol = 10**100
>>> googol
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Bases
IPy Bases Page 26.