Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 3: In this problem, your input file will contain a number of ciphertext and key pairs, separated by a space. You may assume that

Python 3:In this problem, your input file will contain a number of ciphertext and key pairs, separated by a space. You may assume that the ciphertext contains only uppercase letters. However, it is possible that 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 key is missing, your program should output a message "Missing key!".

code.txt

CLGUBA 13

JGNNQ

ZKADQSZ 1

OQJ 4

AKNSR 2

NGBOXKLBMR 7

sample output

Enter the input filename: code.txt PYTHON Missing key! ALBERTA SUN CMPUT UNIVERSITY

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions