title: Error Message Construction
body: <p>So, I have a programming project I'm working on for school. I have constructed the structure of the project. Essentially, I'm turning this logic gate into code so a user can input 1 or 0 and get the output. <a href="http://i.imgur.com/g7dYL2k.jpg" rel="nofollow">http://i.imgur.com/g7dYL2k.jpg</a>
  When the program runs though, and a user inputs 2 (for example) or any other number than 0,1 I want an error message to pop up. I have tried the if: else: statement but I get invalid syntax error when I do this.</p>
  
  <pre><code>#Main instructions
  A = input('Enter 0 or 1 for 1st input: ')
  
  B = input('Enter 0 or 1 for 2nd input: ')
  
  C = input ('Enter 0 or 1 for 3rd input: ')
  
  print 'The logic diagram, LOGIC-1 evaluates for the input values, A, B and C to X'
  
  print "input 1 =",A
  
  print "input 2 =",B
  
  print "input 3 =",C
  
  print (A and not B) and (C or not B)
  </code></pre>