Cryptography Help

label Programming
account_circle Unassigned
schedule 1 Day
account_balance_wallet $5

  Implements a simple substitution cypher

result = ""

def main():
  keepGoing = True
  while keepGoing:
  response = menu()
  if response == "1":
  plain = raw_input("text to be encoded: ")
  print encode(plain)
  elif response == "2":
  coded = raw_input("code to be decyphered: ")
  print decode(coded)
  elif response == "0":
  print "Thanks for doing secret spy stuff with me."
  keepGoing = False
  print "I don't know what you want to do..."

#Define the menu
def menu():
  #print out the menu
  print ("SECRET DECODER MENU\n\n 0) Quit\n 1) Encode\n 2) Decode\n\nWhat do you want to do?")
  #take in user respose and return it
  userResponse = raw_input()
  return userResponse

#define the encoder
def encode(plain):
  #For loop to find the letters in plain
  for letters in plain:
  #find the same letters in alpha and set as location
  location = letters.find(alpha)
  #find the same location in the key
  result = key[location]

How do I make this work?

Oct 25th, 2013

Thank you for the opportunity to help you with your question!

Marketing satisfies these needs and wants through exchange processes and building long-term relationships.

Marketing Functions: Marketing have different functions such as Sales, Advertising & Brand Management, Research, Trade Marketing & Digital Marketing (Social Media Marketing is component / function of Digital Marketing).

Please let me know if you need any clarification. I'm always happy to answer your questions.
Jun 13th, 2015

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
Oct 25th, 2013
Oct 25th, 2013
Aug 19th, 2017
Mark as Final Answer
Unmark as Final Answer
Final Answer

Secure Information

Content will be erased after question is completed.

Final Answer