Write a script that inputs a line of encrypted text and a distance value and outputs plaintext using a Caesar cipher. The script should work for any printable characters.? (Python is used for this problem)

https://media.cheggcdn.com/media%2F81d%2F81d7887a-9040-4590-80d1-128aaa2a4f7e%2FphpUvxMj1.png
Sample Output:
Run-1:
https://media.cheggcdn.com/media%2Fc21%2Fc21a8d7d-a6d1-4995-847f-3cea736425b0%2Fphpmqv7iS.png
Run-2:
https://media.cheggcdn.com/media%2F1f4%2F1f486657-5ad5-4d80-8ca2-fe8bad709be0%2FphppLgFS5.png
Code to copy:
#Definition of the function caesar
def caesar(encrypted_text, distance_value):
#convert the each character in the given encrypted text
#into plain text
#Declare a variable
plainText=”
#Use a for loop, to convert each character of the encrypted text
#into a plain text
for c in encrypted_text:
new_dist=ord(c)-(distance_value%128)
if new_dist
 
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"