I need to create a code for Caesar Cipher. I need to use a for loop to examine every character of text, find shifted character using ALPHABET, key, and String functions, and add this to the end of "encipheredTextSoFar". Need help, not finished but I'm stuck.
EDIT:
I finally got it and this is my final code:
def circularShift(text, key):text = text.upper()cipher = ""for letter in text:shifted = ord(letter) + keyif shifted < 65:shifted += 26if shifted > 90:shifted -= 26cipher += chr(shifted)return cipherprint (circularShift("MOLLOY", 3))
print (circularShift("PROORB", -3))