On Fri, Mar 8, 2013 at 2:32 PM, Neil Cerutti <ne...@norwich.edu> wrote:
> On 2013-03-08, khudo.anasta...@gmail.com > <khudo.anasta...@gmail.com> wrote: > >> I believe your instructor intends you to start with the > >> skeleton of the program provided above. Complete it by writing > >> the missing functions: menu, decode, and encode. > > > > that is where I confused, I am not sure how to do it, I started > > but nothing works. And the tutorials at the internet not > > helpful. If you could write me the code for the decode > > function, that would be awesome, and other i can do by myself. > > Thanks for being honest. But I cannot agree to write any code for > you. > > Can you post an example of something you tried that didn't work? > > -- > Neil Cerutti > -- > http://mail.python.org/mailman/listinfo/python-list > First, think about how to do this without writing code. alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" key = "XPMGTDHLYONZBWEARKJUFSCIQV" The example shows "python rocks" being turned into AQULEWKEMNJ Do you see from the two strings how that works? If you can see that, write a description of how you encode a message. Bring that back with some code that does the same and you will get help -- Joel Goldstick http://joelgoldstick.com
-- http://mail.python.org/mailman/listinfo/python-list