When I run the following code in Jupyter 4.3.1 (Python 2.7.13)
import numpy as np
for i in np.arange(5, 6, 0.1):
print(i)
I got the following output
5.0
5.1
5.199999999999999
5.299999999999999
5.399999999999999
5.499999999999998
5.599999999999998
5.6999999999999975
5.799999999999997
5.899999999999997
However, when I run the code in the console, I got the following output
5.0
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
Why does the Jupyter output differ from the console output?