Question: Do the code in python and add comments please Q1 [5 Points]: Morse Code Encoder - Morse code is an encoding scheme that uses dashes

![Points]: Morse Code Encoder - Morse code is an encoding scheme that](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa2725609fb_05366fa272502b50.jpg)

Do the code in python and add comments please
Q1 [5 Points]: Morse Code Encoder - Morse code is an encoding scheme that uses dashes and dots to represent numbers and letters. In this question, you will write a program that uses a dictionary to store the mapping from lettersumbers to Morse code. Use a period to represent a dot, and a hyphen to represent a dash. The mapping from letter and numbers to dashes and dots (code sheet) is shown below in the table. \# The following is a partially constructed dictionary that stores the code sheet: \# A dictionary is used to store the code sheet Task Description Implement a script that reads a message from the user. Then it should translate the message into Morse code, leaving a space between each letter and number in the message. Your program should ignore any characters that are not letters or numbers. The Morse code for 'Hello, World!' is given below as - Try to implement your code in a modular fashion by defining functions for tasks that are combined to accomplish the solution. In this question, you are asked to implement a Morse code decoder that takes a string in Morse code and returns a string of letters and numbers. You are asked to implement it using the following two methods: - Part (a): Implement the above decoder by first implementing a reverseLookup() function that finds the key in the morse_code dictionary (given in Q1) that map to a specific string value in the input. - Part(b): Implement a second dictionary that maps the Morse code strings (as keys) to letters and numbers as values, and use this dictionary to implement the decoder. - Part(c): Comment on which of the two methods above (in Part a and b) would you prefer and why. \# Your code should go here for Part (a) ] Python \# Your code should go here for Part (b) ] Python Enter your response for Part (c) ] Python
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
