Question
Use python 3 only! Your task Today in lab we will be creating a program to decode a text file. This file was encrypted with
Use python 3 only! Your task Today in lab we will be creating a program to decode a text file. This file was encrypted with an unknown shift using Caesar cipher. 1. Unknown shift in Caesar cipher? In lab 2 you created a program to encrypt a single word using Caesar cipher. In that lab you used a shift of 3. What if someone changed the shift and didnt tell us? 2. New Rule: Special characters I am introducing a new rule to Caesar cipher. The only characters which should be decoded are the letters. Any punctuation or whitespace should not be translated. 3. Requirements Create your program to meet the following requirement. a. Your program should ask the user which file they wish to decode. b. You should read in the text file. c. Figure out what the shift was changed to. Hint: there are only 26 possible shift values. d. Once the shift is found, decode the text file and print the results. HINT: Can your program determine if a message was decoded properly? If so, how? 4. Planning Follow these steps before writing any code. a. Decide what test cases are needed. Maybe create a test file to read in where you know the shift number. b.Spend some time planning what you are going to do. Be sure to rate your partner and turn the file in to the appropriate folder on the CS server.
ENCRYPTED FILE Ktzw xhtwj fsi xjajs djfwx flt, tzw kfymjwx gwtzlmy ktwym ts ymnx htsynsjsy f sjb sfynts: htshjnaji ns qngjwyd, fsi ijinhfyji yt ymj uwtutxnynts ymfy fqq rjs fwj hwjfyji jvzfq. Stb bj fwj jslflji ns f lwjfy hnanq bfw. . .yjxynsl bmjymjw ymfy sfynts, tw fsd sfynts xt htshjnaji fsi xt ijinhfyji. . . hfs qtsl jsizwj. Bj fwj rjy ts f lwjfy gfyyqjknjqi tk ymfy bfw. Bj mfaj htrj yt ijinhfyj f utwynts tk ymfy knjqi fx f knsfq wjxynsl uqfhj ktw ymtxj bmt mjwj lfaj ymjnw qnajx ymfy ymfy sfynts rnlmy qnaj. Ny nx fqytljymjw knyynsl fsi uwtujw ymfy bj xmtzqi it ymnx. Gzy, ns f qfwljw xjsxj, bj hfssty ijinhfyj. . .bj hfssty htsxjhwfyj. . . bj hfssty mfqqtb ymnx lwtzsi. Ymj gwfaj rjs, qnansl fsi ijfi, bmt xywzllqji mjwj mfaj htsxjhwfyji ny, kfw fgtaj tzw uttw utbjw yt fii tw ijywfhy. Ymj btwqi bnqq qnyyqj styj, stw qtsl wjrjrgjw, bmfy bj xfd mjwj, gzy ny hfs sjajw ktwljy bmfy ymjd ini mjwj. Ny nx ktw zx ymj qnansl, wfymjw, yt gj ijinhfyji mjwj yt ymj zsknsnxmji btwp bmnhm ymjd bmt ktzlmy mjwj mfaj ymzx kfw xt stgqd fiafshji. Ny nx wfymjw ktw zx yt gj mjwj ijinhfyji yt ymj lwjfy yfxp wjrfnsnsl gjktwj zx. . .ymfy kwtr ymjxj mtstwji ijfi bj yfpj nshwjfxji ijatynts yt ymfy hfzxj ktw bmnhm ymjd lfaj ymj qfxy kzqq rjfxzwj tk ijatynts. . . ymfy bj mjwj mnlmqd wjxtqaj ymfy ymjxj ijfi xmfqq sty mfaj inji ns afns. . . ymfy ymnx sfynts, zsijw Lti, xmfqq mfaj f sjb gnwym tk kwjjitr. . . fsi ymfy ltajwsrjsy tk ymj ujtuqj. . .gd ymj ujtuqj. . .ktw ymj ujtuqj. . . xmfqq sty ujwnxm kwtr ymj jfwym.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started