Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a script that encodes English-language phrases into a form of coded language called pig Latin. There are many different ways to form pig

Write a script that encodes English-language phrases into a form of coded language called pig Latin. There sists of words separated by blanks, there are no punctuation marks and all words have two or more letters. 

Write a script that encodes English-language phrases into a form of coded language called pig Latin. There are many different ways to form pig Latin phrases. For simplicity, use the following algorithm: To form a pig Latin phrase from an English-language phrase, tokenize the phrase into words with string method split. To translate each English word into a pig Latin word, place the first letter of the English word at the end of the word and add the letters ay." Thus, the word "jump" becomes "umpjay," the word "the" becomes "hetay," and the word "computer" becomes "omputercay." If the word starts with a vowel, just add "ay." Blanks between words remain as blanks. Assume the following: The English phrase con- sists of words separated by blanks, there are no punctuation marks and all words have two or more letters. Enable the user to enter a sentence, then display the sentence in pig Latin.

Step by Step Solution

3.41 Rating (148 Votes )

There are 3 Steps involved in it

Step: 1

Sure heres a simple Python script that encodes Englishlanguage phrases into ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Information Security

Authors: Michael E. Whitman, Herbert J. Mattord

7th Edition

035750643X, 978-0357506431

More Books

Students also viewed these Programming questions