Question: IN PYHTON 3.0 In this problem, your input file will contain a number of key and ciphertext pairs, separated by a space. Each line is

IN PYHTON 3.0

In this problem, your input file will contain a number of key and ciphertext pairs, separated by a space. Each line is supposed to have one such pair. You may assume that the ciphertext contains only uppercase letters. For example the pair:

2 JGNNQ

However, it is possible that the ciphertext and even the key may be missing, and your program should handle this case.

The ciphertext has been encrypted by shifting letters in the alphabet by the amount specified by the key. The word HELLO with key = 2 becomes JGNNQ. Letters should wrap around, so PIZZA with key = 1 becomes QJAAB. If the ciphertext is missing, your program should output a message "Missing text!". The sample run below is for the inputs from secret_code.txt:

Sample Run

[evaluate codebreaker] Enter the input filename: secret_code.txt PYTHON Missing text! ALBERTA SUN Missing text! CMPUT UNIVERSITY 

The input file is not given here. You have to create your own input file with the content as described: each line has a key and ciphertext pair, separated by a space.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!