title: undefined method `<' for true:TrueClass (NoMethodError)
body: <p>I have just started learning Ruby and while doing a switch case problem i encountered this error.</p>
  
  <pre><code>puts "Enter your percentage"
  pr = gets.to_i
  case pr
      when (pr &lt; 40)
          puts "He gets a D"
      when (pr &gt;= 40 &amp; pr &lt; 60)
          puts "He gets a C"
      when (pr &gt;=60 &amp; pr&lt;80)
          puts "He gets a B"
      when (pr &gt;= 80)
          puts "He gets an A"
      else
          puts "he gets an A"
  end
  </code></pre>
  
  <p>When i input 85 i got that error. Can anyone suggest me some change.</p>