title: Using a while loop with an and condition to input a number between two values
body: <p>I'm trying to get an input between two numbers in python using a while loop so that it keeps asking the question until both conditions have been met but it keep just skipping past this when i run the code.</p>
  <pre><code>NumOfStudents=0
  
  while NumOfStudents &gt; 35 and NumOfStudents &lt; 28:
    NumOfStudents = int(input(&quot;Please enter the number of students:&quot;))
  </code></pre>
  <p>Why doesn't an and work here and what should i use instead?</p>