Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40886
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Neil Cerutti <neilc@norwich.edu> |
| Newsgroups | comp.lang.python |
| Subject | Re: crypto program in python. |
| Date | 8 Mar 2013 19:07:55 GMT |
| Organization | Norwich University |
| Lines | 77 |
| Message-ID | <apur8aFl9e5U1@mid.individual.net> (permalink) |
| References | <f55c2474-7312-4366-bde8-d2bb45b22837@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net 2y0wdjFhZJQZ3z6PtcNcVw3tGRXe9l3Q8dV3E0fRcVoYs0ufi0nuspQnddI2Iu+Xza |
| Cancel-Lock | sha1:hbfNoRJgaqNFqYh75lhNJz4Ks2Q= |
| User-Agent | slrn/0.9.9p1/mm/ao (Win32) |
| Xref | csiph.com comp.lang.python:40886 |
Show key headers only | View raw
On 2013-03-08, khudo.anastasia@gmail.com <khudo.anastasia@gmail.com> wrote:
> Hi every every body,
> Today I have to submit my assignment for Computer Science, And
> I am absolutely stuck in writing the code. Please help me in
> soon possible.
>
> The main idea of the program is encode and decode the text.
> that wot the instructor gave us so far.
>
> Sample Run
>
> Here's a sample run of the basic program in action.
>
> SECRET DECODER MENU
>
> 0) Quit
> 1) Encode
> 2) Decode
>
> What do you want to do? 1
> text to be encoded: python rocks
> AQULEWKEMNJ
>
>
> SECRET DECODER MENU
>
> 0) Quit
> 1) Encode
> 2) Decode
>
> What do you want to do? 2
> code to be decyphered: AQULEWKEMNJ
> PYTHONROCKS
>
>
> SECRET DECODER MENU
>
> 0) Quit
> 1) Encode
> 2) Decode
>
> What do you want to do? 0
> Thanks for doing secret spy stuff with me.
> -----------------------------------
> and
>
>
> alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
> key = "XPMGTDHLYONZBWEARKJUFSCIQV"
>
> 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
> else:
> print "I don't know what you want to do..."
>
> -------------------
>
> I am confused about menu and the str function if you can help
> me with this code it will be awesome thank you!!!
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.
--
Neil Cerutti
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
crypto program in python. khudo.anastasia@gmail.com - 2013-03-08 11:01 -0800
Re: crypto program in python. Neil Cerutti <neilc@norwich.edu> - 2013-03-08 19:07 +0000
Re: crypto program in python. khudo.anastasia@gmail.com - 2013-03-08 11:12 -0800
Re: crypto program in python. Neil Cerutti <neilc@norwich.edu> - 2013-03-08 19:32 +0000
Re: crypto program in python. khudo.anastasia@gmail.com - 2013-03-08 11:35 -0800
Re: crypto program in python. Joel Goldstick <joel.goldstick@gmail.com> - 2013-03-08 14:40 -0500
csiph-web