title: Caesar Cipher-Python
body: <p>I recently did an assignment and my professor stated how it's not 100% correct but i'm not sure how else to fix this. His reply to my hw was "Try a key of 29 or 55.  Instead of using ord, use the index of the letter in the ALPHABET string." Now I am very new to programming so any piece of advice would help. Need Help figuring out what to do.</p>
  
  <p>Code:</p>
  
  <pre><code>def circularShift(text, key):
      ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
      text = text.upper()
      shiftedTextSoFar =" "
      for letter in text:
          shifted = ord(letter) + key
          if (shifted &lt; 65):
              shifted += 26
          if (shifted &gt; 90):
              shifted -= 26
          shiftedTextSoFar +=chr(shifted)
      return shiftedTextSoFar
  print (circularShift("MOLLOY", 3)) #SHOULD PRINT PROORB
  print (circularShift("PROOB", - 3)) # SHOULD PRINT MOLLOY
  </code></pre>