Skip to main content

3.12) Scientific Notation


To write numbers in a scientific way with powers of 10, you can use the E notation as a shortcut:

>>> 3E3    # equivalent to 3.0 * 10 **3 (i.e. three times ten to the power of three)
3000.0
>>> 5.0E-2   # equivalent to 5.0 * 10 **-2 (i.e. five times ten to the power of minus two)
0.05

Note that number written in the scientific notation are considered floats:

>>> type(3E3)
<type 'float'>