Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Gravity Falls Cryptogram Solver Version 3: Adding A1Z26 cipher Help Dipper and Mabel discover the secret messages by writing a program that will help you
Gravity Falls Cryptogram Solver Version 3: Adding A1Z26 cipher Help Dipper and Mabel discover the secret messages by writing a program that will help you uncover the mysteries of ciphers! Now, you will add the third method, and your program will provide three potential solutions. Dipper and Mabel will examine the output and choose the one that works best. A1Z26 method is a substitution cipher. It means that it replaces the letter with its number in the alphabet. For example: - Letter A is the first letter in the alphabet, so it will be replaced with 1. - Letter D is the 4th letter in the alphabet, so it will be replaced with 4. - Thus, message AD will be replaced with 1-4 (a dash is added between each two numbers). Assumptions 1. You can safely assume that the original message will never contain any numbers. 2. The A1Z26 cipher is case-insensitive, so you will lose the information about the case of the letters. It's fine. What to do In addition to the decrypt_caesar() and decrypt_atbash() functions that you already have, implement the decrypt_a1z26() function that would decipher a given message with the A1Z26 cipher. 1. Keep your decrypt_caesar() and decrypt_atbash() functions as is 2. Implement the decrypt_a1z26() function that would decipher (decrypt) a given message with the A1Z26 cipher 3. Alter your main() function, so that it tries all three ciphers \# decrypt_caesar() function is already implemented, do not change it \# decrypt_atbash() function is already implemented, do not change it def decrypt_a1z26(text: str) - str: Decipher a text (A1Z26 cipher). """ \# TODO: Implement this function pass def main() -> None: """ Main program. """ text = input("Enter a text to decipher: ") print("Let's try all the methods we have:") \# TODO: Alter the main() function, it should print \# text deciphered with all three methods main() Hints - You could convert the double digit numbers to letters before converting the single digit numbers (starting from 26 and working your way down to 1) - new hint added on Oct 5 - Remember that some arguments of range( ) can be negative (and it can take up to three arguments)! Program name Save your program as gravity3.py
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started