'''
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):
'''
small =
crypalph = []
ROT13 = 13
for x in range(0,26):
crypalph.append(small[(x+ROT13)%26])
message = raw_input ("Please enter some text: \t")
cryptmessage =''
for x in message:
if small.count(x):
cryptmessage += crypalph[small.index(x.lower())]
else:
cryptmessage += x
print "__________________________________________"
print "\nEncrypted message: \t\t" + cryptmessage
print "__________________________________________"
raw_input ("\nPress [Enter] to decode '" + cryptmessage + "'")
message =''
for x in cryptmessage:
if small.count(x):
message += crypalph[small.index(x)]
else:
message += x
print "__________________________________________"
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!
'''