Question: Task 1 : Decrypting a Shift Cipher ( Caesar Cipher ) Problem Statement: You need to decrypt a string that was encrypted using a shift
Task : Decrypting a Shift Cipher Caesar Cipher
Problem Statement: You need to decrypt a string that was encrypted using a shift cipher Caesar cipher
Your Specific Inputs:
Encrypted String: "Xli$Tvstlix$Tiegi$erh$Fpiwwmrkw$Fi$Ytsr$Lmq$Wemh$E$Qywpmq$mw$xli$sri$ ls$ezsmhw$levqmrk$Qywpmqw$ mxl$lmw$xsrkyi$sv$lmw$lerhw$Erh$e$Qylenmv$er$iqmkverx$mw$xli$sri$ ls$kmziw$yt$eferhsrw$epp$ lex$Eppel$lew$jsvfmhhir
Your Student ID:
Key:
Python Code Snippet:def decryptcaesarcipherinputstr key: decryptedtext for char in inputstr: if char.isalpha: shift ordchar key if char.islower: if shift orda: shift elif char.isupper: if shift ordA: shift decryptedchar chrshift else: decryptedchar char decryptedtext decryptedchar return decryptedtext if namemain: encryptedstring key printdecryptcaesarcipherencryptedstring, keyExpected Output: Your code should decrypt the given string using the key provided. The output should be readable English text.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
