Question: Write a program that takes a secret encrypted message and returns the hidden decrypted message by changing each letter in the message with the next


Write a program that takes a secret encrypted message and returns the hidden decrypted message by changing each letter in the message with the next one in the alphabet (For example, A replaced with B, B replaced with c, c replaced with D. and z replaced with A). Spaces and punctuations are not changed. For instance: "Gdx, Oxsgnm hr fadzs!" will be decrypted as "HEY, PYTHON IS GREAT!" alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ x = decodelt("Gdx Oxsgnm hr fadzs!". n) print(x) To answer the question, drag and drop the statements (below) to their correct position in the code (above). x = decodelt("Gdx, Oxsgnm hr fqdzs!") result += alphabet[(alphabet.find(char) + n) % len(alphabet)] if char not in alphabet: return result for char in txt.upper: x = decodelt("Gdx, Oxsgnm hr fadzs!") result += alphabet[(alphabet.find(char) + n) % len(alphabet) if char not in alphabet: return result for char in txt.upper(): if char!= alphabet: def decodelt(txt, n): def decodelt(txt): else: result 111 result += char
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
