subject
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)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:10
Linux is distributed under gnu gpl. why is this important? a. it ensures that only torvalds can profit from the sale of linux b. it prevents unknowledgeable users from downloading programs they don't know how to operate. c. it provides protection for the developers who created linux. d. it states that anyone can copy, modify, and share the program if changes are made public.
Answers: 1
question
Computers and Technology, 24.06.2019 00:20
Describe a data structures that supports the stack push and pop operations and a third operation findmin, which returns the smallest element in the data structure, all in o(1) worst-case time.
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
What is the purpose of a computer network needs assessment? to analyze which workers need more training to improve their performance to compare worker productivity to determine what steps employees can take to increase company revenue to evaluate how to move from the current status to the desired goal
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
1. which of these is not true about torsion bars? a. they can be used to adjust ride height b. they can be adjusted anytime since they don't affect alignment angles c. they attach between the frame and the lower control arm d. they twist to produce a spring effect
Answers: 1
You know the right answer?
Write a script that inputs a line of encrypted text and a distance value and outputs plaintext using...
Questions
question
History, 23.10.2020 16:40
question
Mathematics, 23.10.2020 16:40
question
Biology, 23.10.2020 16:40
question
Chemistry, 23.10.2020 16:40
question
English, 23.10.2020 16:40
question
Mathematics, 23.10.2020 16:40
Questions on the website: 13722361