In PYTHON programming language: Morse Code, created by Samuel Morse, is a method used as far back as

In PYTHON programming language: Morse Code, created by Samuel Morse, is a method used as far back as the early 19th century to encode alphanumeric characters and common punctuation marks into a series of dots and dashes. These dots and dashes can be communicated by various means, such as a flashlight turning on and off in a night sky or across electrical wires as electricity flow being switched. This lead to the invention of the first electrical communication device, the telegraph, a device that could transmit electrical pulses across a network of wires. In this assignment, we are going to

In PYTHON programming language: Morse Code, created by Samuel Morse, is a method used as far back as the early 19th century to encode alphanumeric characters and common punctuation marks into a series of dots and dashes. These dots and dashes can be communicated by various means, such as a flashlight turning on and off in a night sky or across electrical wires as electricity flow being switched. This lead to the invention of the first electrical communication device, the telegraph, a device that could transmit electrical pulses across a network of wires. In this assignment, we are going to apply concepts we learned over the past few month to produce a program that takes in a message as user-specified input and generates a series of dots and dashes that will represent its Morse Code encoding. Appendix A has a table of Morse Code encodings for the characters we will use in this program. The way this program will work is that it will utilize two parallel lists, like we saw in the famous _scientists program in a previous lab. One list will contain the letters, numbers, and punctuation marks that can be converted to Morse Code, and the other list will contain the Morse Code string for each matching character(i.e. the string will contain the series of dots and dashes that represent the Morse Code for that character). I have prepared a library of functions that you may use to quickly generate these lists (will be provided along with assignment document). Use these functions to return the character list and the morse code list. The program will ask the user for the message as input. Since morse code encoding has no distinction between upper and lower case characters, make sure to convert the message to all lowercase characters (Link: https://www.tutorialspoint/python/string_lower.htm). Once you have inputted the message from the user, you must then use the contains_valid_chars function to make sure that the message has no invalid characters (i.e. characters not present in the Morse Code table we are using in Appendix A). Repeatedly ask the user for the message if invalid characters are entered by the user. Once the user message is validated, pass the input to a function that you will create called conv_to_ Morse. conv_to_morse will generate the Morse table using the function from the module I provided (i.e. the generate_char_table and generate_morse_table) and, for each character in the message, determine the index of that character in the char_table and then use the same index to find the morse_code string of that character. Append each morse_code string to a string called morse(should be initialized to an empty string) to produce the entire Morse code message. Return the Morse code message to main, where main will output the message. Functions/lists starting code: from string import ascii_lowercase from string import digits # Constructs a list of all the characters # that can be converted to Morse Code def generate_char_table(): table_char = list(ascii_lowercase) table_char += list(digits) table_char += list(“.,:?’-” “”) return table_char # Constructs a list of all the morse code sequences # for each valid character in the Morse Code Table. # Should be used in parallel to the char table from # the above function. def generate_morse_table(): table_morse = [] “”””””A”””””” table_morse.append(“” -“”) “”””””B”””””” table_morse.append(“”- “”) “”””””C”””””” table_morse.append(“”- – “”) “”””””D”””””” table_morse.append(“”- “”) “”””””E”””””” table_morse.append(“”””) “”””””F”””””” table_morse.append(“” – “”) “”””””G”””””” table_morse.append(“”- – “”) “”””””H”””””” table_morse.append(“” “”) “”””””I”””””” table_morse.append(“” “”) “”””””J”””””” table_morse.append(“” – – -“”) “”””””K”””””” table_morse.append(“”- -“”) “”””””L”””””” table_morse.append(“” – “”) “”””””M”””””” table_morse.append(“”- -“”) “”””””N”””””” table_morse.append(“”- “”) “”””””O”””””” table_morse.append(“”- – -“”) “”””””P”””””” table_morse.append(“” – – “”) “”””””Q”””””” table_morse.append(“”- – -“”) “”””””R”””””” table_morse.append(“” – “”) “”””””S”””””” table_morse.append(“” “”) “”””””T”””””” table_morse.append(“”-“”) “”””””U”””””” table_morse.append(“” -“”) “”””””V”””””” table_morse.append(“” -“”) “”””””W”””””” table_morse.append(“” – -“”) “”””””X”””””” table_morse.append(“”- -“”) “”””””Y”””””” table_morse.append(“”- – -“”) “”””””Z”””””” table_morse.append(“”- – “”) “”””””——-Digits——–“””””” “”””””0″””””” table_morse.append(“”- – – – -“”) “”””””1″””””” table_morse.append(“” – – – -“”) “”””””2″””””” table_morse.append(“” – – -“”) “”””””3″””””” table_morse.append(“” – -“”) “”””””4″””””” table_morse.append(“” -“” “”””””5″””””” table_morse.append(“” “”) “”””””6″””””” table_morse.append(“”- “”) “”””””7″””””” table_morse.append(“”- – “”) “”””””8″””””” table_morse.append(“”- – – “”) “”””””9″””””” table_morse.append(“”- – – – “”) “”””——–Punctuation———“””””” “”””””Period”””””” table_morse.append(“” – – -“”) “”””””Comma”””””” table_morse.append(“”- – – -“”) “”””””Colon”””””” table_morse.append(“”- – – “”) “”””””Question Mark”””””” table_morse.append(“” – – “”) “”””””Apostrophe”””””” table_morse.append(“” – – – – “”) “”””””Hyphen”””””” table_morse.append(“”- -“”) “”””””Quotation Mark”””””” table_morse.append(“” – – “”) “”””””Space”””””” table_morse.append(“” “”) # for index in range(len(table Morse)): # print(table_char[index]

Elite Writer Help
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.