title: Python - Caesar Cipher Error
body: <p>I am attempting to create a Caesar cipher in python however I have encountered an error.
  My code is:</p>
  
  <pre><code>print("Enter desired function.")
  print("1 - Encode")
  print("2 - Decode")
  function = input("")
  if function == "1":
      print("How much do you want to offset it by?")
      offset = int(input(""))
  elif function == "2":
      print("How much is it offset by?")
      offset = int(input("")) * -1
  print("Enter the message.")
  message = input("")
  upperMessage = message.upper
  length = len(message)
  for i in range(length):
      letter = upperMessage[i-1]
      number = ord(letter)
      offsetNumber = number + offset
      if offsetNumber &gt; 90:
          highOffset = offsetNumber - 90
          offsetNumber = 65 + highOffset
      if offsetNumber &lt; 65:
          lowOfsset = 65 - offsetNumber
          offsetNumber = lowOffset + 90
      newLetter[i-1] = chr(offsetNumber)
   print(newLetter)
  </code></pre>
  
  <p>It runs fine to begin with but when I enter the message I receive the error:</p>
  
  <pre><code>TypeError: 'builtin_function_or_method' object is not subscriptable
  </code></pre>
  
  <p>I have tried replacing the line</p>
  
  <pre><code>letter = upperMessage[i-1]
  </code></pre>
  
  <p>with</p>
  
  <pre><code>letter = upperMessage(i-1)
  </code></pre>
  
  <p>but this returns the error</p>
  
  <pre><code>TypeError: upper() takes no arguments (1 given)
  </code></pre>
  
  <p>Can you please help me?
  Many thanks,
  RFox</p>