crypto program in python.

Joel Goldstick joel.goldstick at gmail.com
Fri Mar 8 20:40:38 CET 2013


On Fri, Mar 8, 2013 at 2:32 PM, Neil Cerutti <neilc at norwich.edu> wrote:

> On 2013-03-08, khudo.anastasia at gmail.com
> <khudo.anastasia at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130308/abaad7de/attachment.html>


More information about the Python-list mailing list