Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Before your fancy-schmancy smart phones with auto-complete and auto-correct, sending messages on a phone was a pain. That's why textspeak' became a thing with words

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Before your fancy-schmancy smart phones with auto-complete and auto-correct, sending messages on a phone was a pain. That's why "textspeak' became a thing with words like lol, ttyl, irl. One less effective way to shorten the amount of typing required is to remove every 2 nd letter, or every 3 rd letter, etc. Weil call this the skip number. You are to complete a program that will read a file containing some text (like a paragraph) it will then convert the text to a "letter reduced" version. This new version will be printed. \# Notes Every word would have each skipth letter removed. Not every skipth letter in the sentence or paragraph. If the length ot a word is less than the skip number, no letters would be removed. Example (skip =3 ): "This is an incredible thing" This is an inceibe thing.7 You will likely need to use the split0 and join0 functions You will need to write code for 3 methods that accomplish a specific subtask. Finally, you will use these methods together in the init method in order to complete the program. // Enjoy Javascript with ES6 features i) const getHelloworldstr =() "Hello, world!" console. log( gethelloworldstr()): def file to wordiist(self, filename in): this method openes the given file, reads it and returns it as a 1 ist of words. file = open(filename_in) text = file,read() word1ist - text. sp11t(") ") return wordlist return wordlist def word convert(self, word, skip): A ccepts a single word. Returns a version of the word where every spipth letter has been removed.wordlist def convert word(self, word_list, skip): Accepts as inpur a list of words, and the skip number Returns a list of converted words. pass t - Textconverten ("input. txt", 3) print(t.file_to_wordlist("input.txt, ")) print(t.word_convert("input,tet,")) print ( t, concent_word) ("input. txt, "))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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