Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
tcc8m
Group Title
Does anyone have the answer(code) to Problem 3(multilevel encryption & decryption) from Problem set #4?
I did not see that answer in the solutions file. Thanks.
 2 years ago
 2 years ago
tcc8m Group Title
Does anyone have the answer(code) to Problem 3(multilevel encryption & decryption) from Problem set #4? I did not see that answer in the solutions file. Thanks.
 2 years ago
 2 years ago

This Question is Closed

harsimran_hs4 Group TitleBest ResponseYou've already chosen the best response.1
hey a better way would be you write your own code and then if you face any problem put it here if you have already written then you may post your code here for discussion
 one year ago

tcc8m Group TitleBest ResponseYou've already chosen the best response.0
Ok I tried to make an attempt at this problem (attached below). My answer is wrong. Can someone provide the correct code and/or evaluate my code. Thanks. http://pastebin.com/0Y67n61r
 one year ago

TuringTest Group TitleBest ResponseYou've already chosen the best response.0
I did this problem for edX, which is based on the OCW version, but I don't seem to have a function "apply_shifts" I have "apply_shift" and "find_best_shift", but it didn't require tuples so it's hard for me to figure out how to make compare your code and mine.
 one year ago

harsimran_hs4 Group TitleBest ResponseYou've already chosen the best response.1
actually i didn`t get what whole of your code meant but still i recommend that you have different functions one creating the dictionary with letter as key and shifted one{which you have already done as build_encoder (perhaps) other function of applying the shifts i.e apply_shifts i had followed this approach take some newstring then suppose you have to apply (3, 6) sought of thing newstring = pick upto 3rd letter the input text + shifted text for the rest try it by this approach if still there is any problem i will elaborate using my code Hope this helps
 one year ago

tcc8m Group TitleBest ResponseYou've already chosen the best response.0
Thanks guys for the input. I just found my mistake. My new code works. My mistake was that in line 28 of the previous code I inputed "placeholder[key:]" whereas I should have used just "placeholder". I changed that variable name to new_shift in the code below. Placeholder was a terrible name for that variable. Cheers. http://pastebin.com/cuyib61q
 one year ago

harsimran_hs4 Group TitleBest ResponseYou've already chosen the best response.1
how about this one...much shorter tough http://pastebin.com/gicZ3qYc
 one year ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.