Hi there, I am totally new to this site as well as Python. Luckily Python is a not too hard programming language to start with.
I am trying to create a Caesar Cipher with ROT13 program that encodes user text ('a' - 'z' and 'A' - 'Z') to 13 (ROT13) places (where a turns to n...) and then also decodes the raw text to the original user input.
I have searched many forums and looked at online as well as textbook examples and I have come up with the following code (I am also not using external libraries):
crypalph = 
ROT13 = 13
for x in range(0,26):
message = raw_input ("Please enter some text: \t")
for x in message:
cryptmessage += crypalph[small.index(x.lower())]
cryptmessage += x
print "\nEncrypted message: \t\t" + cryptmessage
raw_input ("\nPress [Enter] to decode '" + cryptmessage + "'")
for x in cryptmessage:
message += crypalph[small.index(x)]
message += x
print "\nDecrypted message: \t\t" + message + '\n'
raw_input ("\n\nPress [Enter] to continue")
The thing is that this program can only encode and decode lower case letters thus far. I want to know 2 things.
Firstly, can someone explain to me exactly what each line does because I only understand little things here and there.
Secondly, how can I also let the program encode Uppercase letters as well?
Help would be greatly appreciated!