title: Validating an input using a simple while loop
body: <p>I want to validate an input to only accept 0s or 1s using a while loop. I would like to use the Boolean "OR," so while the input is not equal to 1 or 0, print an error and insist that the user reinputs the value. If it is, continue with the code so that the user can input the rest of the data.</p>
  
  <p>The following codes works when a 1 is input but does not work for the second condition (in this example 0), no matter what the condition is.</p>
  
  <pre><code>number1=int(input("enter the your number)"))
  while number1 !=1 or 0:
      print ("You must enter a BINARY number")
      number1=int(input("enter you first binary digit (from the right)"))
  
  number2=int(input("enter the next (from the right)"))
  while number2 !=1 or 0:
    print ("You must enter a BINARY number")
    number2=int(input("enter you second binary digit (from the right)"))
  </code></pre>
  
  <p>and so on...</p>