Computers and Technology
Computers and Technology, 17.12.2020 17:40, jaici68

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. An example of the program input and output is shown below:Enter the coded text: Lipps${svph% Enter the distance value: 4 Hello world!# Request the inputscodedText = input("Enter the coded text: ")distanceValue = int(input("Enter the distance value: "))# Calculate the decryptionplainText = ""for cr in code:ordvalue = ord(ch)cipherValue = ordvalue - distanceif cipherValue < ord('a'):cipherValue = ord('z') - \ (distance - (ord('a') - ordvalue - 1))plainText += chr(cipherValue)print(plainText)

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:00, magicalunicorns47
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
image
Computers and Technology, 23.06.2019 10:00, austintules2005
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
image
Computers and Technology, 23.06.2019 22:50, christingle2004
What is an rss reader used for? for creating a user account on a social new site
Answers: 2
image
Computers and Technology, 24.06.2019 03:00, SiegeHatake4534
Will do anything for brainlest so can you guys me out i will try my best to you out
Answers: 1
Do you know the correct answer?
Write a script that inputs a line of encrypted text and a distance value and outputs plaintext using...

Questions in other subjects:

Konu
Mathematics, 07.01.2021 19:00