Help me with modifying my code. Instruction: Create a module that decrypts the following message. Lezi$e$kviex$wyqqiv$fv

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Help me with modifying my code. Instruction: Create a module that decrypts the following message. Lezi$e$kviex$wyqqiv$fv

Post by answerhappygod »

Help me with modifying my code.
Help Me With Modifying My Code Instruction Create A Module That Decrypts The Following Message Lezi E Kviex Wyqqiv Fv 1
Help Me With Modifying My Code Instruction Create A Module That Decrypts The Following Message Lezi E Kviex Wyqqiv Fv 1 (6.8 KiB) Viewed 65 times
Instruction:
Create a module that decrypts the following message.
Lezi$e$kviex$wyqqiv$fvieo The original
message was encrypted using a Caesar Cypher by four characters.
My code in python:
code= input("Enter the coded text: ")
distance= int(input("Enter the distance value: "))
plainText= ""
for txt in code:
ordvalue= ord(txt)
cipherValue = ordvalue - distance
if cipherValue < ord("a"):
cipherValue= ord("z") - \

(distance - (ord("a") - ordvalue - 1))
plainText += chr(cipherValue)
print(plainText)
Enter the coded text: Lezi$e$kviex$wyqqiv$fvieo Enter the distance value: 4 #ave?agreat2 summer2 break
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply