<div>I was trying to write a code that prints prime numbers between 1 and 20.</div>
<div> </div>
<div>I have by myself seen that something is wrong with my code and also my brain.</div>
<div> </div>
<div>Could anyone be kind enough to tell me what to do....</div>
<div> </div>
<div>Where I am confused is how to test for other numbers without one and the number itself. It turns out that all numbers pass the condition I set so that would presuppose that all numbers are prime which is not.</div>
<div> </div>
<div>How exactly can I get it to run checks with other numbers such that it doesn&#39;t include the number itself and 1.</div>
<div> </div>
<div>The code is as follows:</div>
<div> </div>
<div>for i in range(1,20):<br>    <br>    if float(i) % 1 == 0 and float(i) % i == 0:<br>        print i, &#39;is a prime number&#39;<br>   <br clear="all"><br>-- <br>Elegbede Muhammed Oladipupo<br>OCA<br>+2348077682428<br>
+2347042171716<br><a href="http://www.dudupay.com">www.dudupay.com</a><br>Mobile Banking Solutions | Transaction Processing | Enterprise Application Development<br></div>