alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
key = "XPMGTDHLYONZBWEARKJUFSCIQV"
def encode():
alpha[""] = key["x"]
def decode():
key[""] = alpha[""]
def menu():
response = raw_input("""Crypto Menu
quit(0)
encode(1)
decode(2)""")
return response
def main():
keepGoing = True
while keepGoing:
response = menu()
if response == "1":
plain = raw_input("text to be encoded: ")
print encode()
elif response == "2":
coded = raw_input("code to be decyphered: ")
print decode()
elif response == "0":
print "Thanks for doing secret spy stuff with me."
keepGoing = False
else:
print "I don't know what you want to do..."
print main()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
key = "XPM