when I startup python, I don't import anything and I just enter 1/10, it returns 0. Any idea how to fix this?
Asked
Active
Viewed 53 times
0
Alexander
- 96,739
- 27
- 183
- 184
Perm. Questiin
- 421
- 1
- 8
- 20
-
3integer division. Convert to float: `1/10.` – Alexander Aug 08 '17 at 18:25
-
Which Python? My Python 3.5.1 is showing `0.1`. – Eugene Sh. Aug 08 '17 at 18:26
-
use python 3, not python 2 – jeremycg Aug 08 '17 at 18:26
-
You are exactly right. Making it a float fixed it. I thought it did that automatically. Also I noticed I was using 2.7 instead of 3.5. oos! I did not know this was different in 2.7. – Perm. Questiin Aug 08 '17 at 18:28