subject
Computers and Technology, 14.04.2020 16:11 u8p4

Write a program that encodes English-language phrases into pig Latin. To translate an English word into a pig Latin word, place the first letter of the English word at the end of word and add "ay". For example, "dog" would become "ogday" and cat would become "atcay". Your program should prompt the user to enter an English sentence and then print the sentence with every word changed to pig Latin. (One way to do this would be to split the sentence into words with the split() method.) For simplicity, there will be no punctuation in the sentences. This is sample run of your program: Enter·a·string·to·be·translated:the ·fox·jumps·over·the·lazy·dog↵ hetay·oxfay·umpsjay·veroay·hetay·az ylay·ogday↵

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:50
3.2.5 suppose that we have an estimate ahead of time of how often search keys are to be accessed in a bst, and the freedom to insert items in any order that we desire. should the keys be inserted into the tree in increasing order, decreasing order of likely frequency of access, or some other order? explain your answer.
Answers: 1
question
Computers and Technology, 22.06.2019 01:00
)a grad student comes up with the following algorithm to sort an array a[1..n] that works by first sorting the first 2/3rds of the array, then sorting the last 2/3rds of the (resulting) array, and finally sorting the first 2/3rds of the new array. 1: function g-sort(a, n) . takes as input an array of n numbers, a[1..n] 2: g-sort-recurse(a, 1, n) 3: end function 4: function g-sort-recurse(a, `, u) 5: if u ⒠` ≤ 0 then 6: return . 1 or fewer elements already sorted 7: else if u ⒠` = 1 then . 2 elements 8: if a[u] < a[`] then . swap values 9: temp ↠a[u] 10: a[u] ↠a[`] 11: a[`] ↠temp 12: end if 13: else . 3 or more elements 14: size ↠u ⒠` + 1 15: twothirds ↠d(2 ◠size)/3e 16: g-sort-recurse(a, `, ` + twothirds ⒠1) 17: g-sort-recurse(a, u ⒠twothirds + 1, u) 18: g-sort-recurse(a, `, ` + twothirds ⒠1) 19: end if 20: end function first (5 pts), prove that the algorithm correctly sorts the numbers in the array (in increasing order). after showing that it correctly sorts 1 and 2 element intervals, you may make the (incorrect) assumption that the number of elements being passed to g-sort-recurse is always a multiple of 3 to simplify the notation (and drop the floors/ceilings).
Answers: 3
question
Computers and Technology, 23.06.2019 07:30
Which option allows you to view slides on the full computer screen?
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
Adrawing that places all lines parallel to the z axis at an angle from the horizon is 99 ! a. an oblique drawing b. a perspective drawing c. an auxiliary view d. a one-point perspective drawing
Answers: 2
You know the right answer?
Write a program that encodes English-language phrases into pig Latin. To translate an English word i...
Questions
question
Mathematics, 14.04.2021 22:00
question
Mathematics, 14.04.2021 22:00
question
Computers and Technology, 14.04.2021 22:00
question
Mathematics, 14.04.2021 22:00
question
Mathematics, 14.04.2021 22:00
question
Biology, 14.04.2021 22:00
question
World Languages, 14.04.2021 22:00