title: Temperature function issue in Python
body: <p>I have written some code to convert Celsius to Fahrenheit (and vice versa) allowing the user to choose which way to convert before they input the value to be converted.</p>
  
  <p>The program seems to be working fine when I choose option 1 (to go from F to C) - but when I choose option 2 (C to F) it reverts me to option 1.</p>
  
  <p>I'm obviously doing something wrong (I suspect it may be something to do with my conditional True or False step).</p>
  
  <p>Here's my code:</p>
  
  <pre><code>def instructions():
      print('This is a program to convert from F to C or C to F')
  
  def chooser():
      choice = input('Choose:\n1 for Fahrenheit to Celsius\nor\n2 for Celsius to Fahrenheit\n--&gt; ')
      if choice is 1:
          return True
      else:
          return False
  
  def F_userInput():
      fahrenheit = input('Please enter the temperature in Fahrenheit: ')
      return float(fahrenheit)
  
  def f2c(temperature):
      celsius = (temperature - 32) * 5/9
      return celsius
  
  def C_userInput():
      celsius = input('Please enter the temperature in Celsius: ')
      return float(celsius)
  
  def c2f(temperature):
      fht = (temperature * 9/5) + 32
      return fht
  
  def output(result):
      print 'Your coverted temperature is', result
  
  def main():
      instructions()
      chooser()
      if True:
          temperature = F_userInput()
          result = f2c(temperature)
      else:
          temperature = C_userInput()
          result = c2f(temperature)
      output(result)
  
  main()
  </code></pre>
  
  <p>Please note - I have managed to write a simpler program to do this conversion - but I am noodling around with functions to help me understand them better (and how to call certain functions and not others).</p>
  
  <p>PS please feel free to give me any tips/advice/alternative ways of doing this.</p>