title: how do you add the values of variables in python?
body: <p>I am trying to add the values of variables on python but it doesn't seem to work.</p>
  
  <p>I want to try and add the values of the variables together even if the value is either True or False: please - can anyone help?</p>
  
  <pre><code>final=0
  print ("welcome to my binary converter")
  print("first number is the smallest value")
  print ("please enter a 0 or a 1 five times")
  
  in1 = input("number 1 please")
  
  if in1 == 1:
      final=final+1
  elif in1 == 0:
      final=final+0
  elif ValueError
      print("please enter a 1 or a 0")
  
  in2 = input("number 2 please")
  
  if in2 == 1:
      final=final+2
  elif in2 == 0:
      final=final+0
  elif ValueError
      print("please enter a 1 or a 0")
  
  in3 = input("number 3 please")
  
  if in3 == 1:
      final=final+4
  elif in3 == 0:
      final=final+0
  elif ValueError
      print("please enter a 1 or a 0")
  
  in4 = input("number 4 please")
  
  if in4 == 1:
      final=final+8
  elif in4 == 0:
      final=final+0
  elif ValueError
      print("please enter a 1 or a 0")
  
  in5 = input("number 5 please")
  
  if in5 == 1:
      final=final+16
  elif in5 == 0:
      final=final+0
  elif ValueError
      print("please enter a 1 or a 0")
  print(final)
  </code></pre>
  
  <p>And I have tried looking on this website, python books, help online, python teacher, etc.</p>
  
  <p>Also, I have version 3.3.0 if that helps.</p>
  
  <p>Jacob</p>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <p>welcome to my binary converter</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>first number is the smallest value</p>
  
  <p>please enter a 0 or a 1 five times</p>
  
  <p>number 1 please1</p>
  
  <p>please enter a 1 or a 0</p>
  
  <p>number 2 please0</p>
  
  <p>please enter a 1 or a 0</p>
  
  <p>number 3 please0</p>
  
  <p>please enter a 1 or a 0</p>
  
  <p>number 4 please1</p>
  
  <p>please enter a 1 or a 0</p>
  
  <p>number 5 please1</p>
  
  <p>please enter a 1 or a 0</p>
  
  <p>0</p>
  
  <p>it seems to not change the value of final</p>