Hello. I was wondering if anyone could help me with a caesar cipher program I am attempting to create. I was asked to write a caesar cipher encoder program. Ok. No problem. This is what i got:
import string def main(): print "This program will encode your messages using a Caesar Cipher" print key = input("Enter the key: ") message = raw_input("Enter the message: ") codedMessage = "" for ch in message: codedMessage = codedMessage + chr(ord(ch) + key) print "The coded message is:", codedMessage main()
This works fine. But then I am asked to modify it to make it circular, where after "z" it will return to "a". I am at a loss for how to do this. This is probably a stupid question, but I am a beginner to Python and desperately need assistance. Please help. Thanks.