(Pig Latin) Write a script that encodes English language phrases into pig Latin. Pig Latin is a form of coded language often used for amusement. Many variations exist in the methods used to form pig Latin phrases. For simplicity, use the following algo- rithm:

To form a pig Latin phrase from an English language phrase, tokenize the phrase into an array of words using 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.” Blanks between words remain as blanks. Assume the following: The English phrase
consists of words separated by blanks, there are no punctuation marks and all words have two or more letters. Function print-
LatinWord should display each word. Each token (i.e., word in the sentence) is passed to method printLatinWord to print

the pig Latin word. Enable the user to input the sentence through an HTML form. Keep a running display of all the converted sen-
tences in an HTML TEXTAREA.


```

1

2

3

4

5

6

7 Solution: 18.9

8

9

33

34

35

36



37

38

39

40
Enter a sentence
Computer Science & Information Technology

You might also like to view...

MC The______namespace contains identifiers that correspond to many Python functions and error messages.

a) global. b) built-in. c) local. d) All of the above.

Computer Science & Information Technology

Which of the following is false?

a) Programs communicate with objects by using well-defined interfaces. b) Objects do not have the property of information hiding. c) Browsers have a set of objects that encapsulate the HTML document. d) Characters are the building blocks of JavaScript programs.

Computer Science & Information Technology

Critical Thinking QuestionsCase E-1Stephan, an amateur photographer,  is new to the game of analyzing the appearance of images and using Photoshop to improve the quality of his images. He has been surfing around the web looking for pointers, and has come across several new terms to add to his photography vocabulary. Stephan also learned that when he can see all of the transitions from dark to light in a grayscale image, it is called ____.

A. continuous tone B. smooth transition C. stair-stepping D. blocked transition

Computer Science & Information Technology

You can press ____ to activate the History Brush tool.

a. Y b. A c. H d. B

Computer Science & Information Technology