 <h2>Your Logic is wrong..</h2> <p>As a matter of fact, OR Operator for two NOT EQUALS is always TRUE ( check boolean table for this) and the conditional statement "if" checks for TRUE or FALSE, hence your code will always return TRUE</p> <p>Use something like </p> <pre><code>if(tanksize!=1 &amp;&amp; tanksize!=2){ # Your code } </code></pre>