Why I get this 0 as answer for (1/10) in Python?
<p>I am trying this in Python 2.7 Interpreter.</p>

<pre><code>&gt;&gt;&gt; print 1/10  
0  
&gt;&gt;&gt; print float(1/10)  
0.0  
&gt;&gt;&gt; print 1/5  
0  
&gt;&gt;&gt; a = 1/5  
&gt;&gt;&gt; a  
0  
&gt;&gt;&gt; float(a)  
0.0  
&gt;&gt;&gt;   
</code></pre>

<p>I want a value in floating point when I divide.  Any idea on the logic behind this zero out put and please let me know how to do it correctly.</p>
