1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Novosadov [1.4K]
3 years ago
13

Write a function to_pig_latin that converts a word into pig latin, by: Removing the first character from the start of the string

, Adding the first character to the end of the string, Adding "ay" to the end of the string. So, for example, this function converts "hello"to "ellohay". Call the function twice to demonstrate the behavior. There is a worked example for this kind of problem.
Computers and Technology
1 answer:
S_A_V [24]3 years ago
8 0

Answer:

def to_pig_latin(word):

   new_word = word[1:] + word[0] + "ay"

   return new_word

print(to_pig_latin("hello"))

print(to_pig_latin("latin"))

Explanation:

Create a function called to_pig_latin that takes one parameter, word

Inside the function, create a new_word variable and set it to the characters that are between the second character and the last character (both included) of the word (use slicing) + first character of the word + "ay". Then, return the new_word.

Call the to_pig_latin function twice, first pass the "hello" as parameter, and then pass the "latin" as parameter

You might be interested in
Options to open,save,and print a document are found on which of the following tabs? A.File B.Home C. Design D. Layout
maria [59]

Those options are usually under the "File" tab.

3 0
4 years ago
Read 2 more answers
How can random numbers in a range be generated in Java?.
Ksju [112]

Answer:

Java oh Na Na my  

Explanation:

5 0
3 years ago
What is the purpose of the Zoom dialog box? to put the selected range in ascending order in a query to put the selected range in
AlekseyPX

The zoom dialog box helps to enter text and expressions in tight places, such as a property sheet or Query Design view. You can resize the zoom box and change the font. And the zoom box remembers the size and font each time you use it.

Use the

5 0
3 years ago
Read 2 more answers
Give four examples of devices which are both<br>Input and Output to a Computer.​
myrzilka [38]

Answer:

HDMI ,I only have one answer to this question

4 0
3 years ago
Supposethatyoubet$5oneachofasequenceof50independentfairgames. Usethecentrallimittheorem to approximate the probability that you
lions [1.4K]

Answer:

0.119

Explanation:

50 independent fair games

Mean will be 50/2 = 25

Standard deviation of the loosing probability is :

\sqrt{50*0.5*0.5} * 10 = 33.536

we have to loose 33 times out of 50 games.

To find the approximate probability we use z- value table.

z value =  \frac{33-25}{3.35}

z - value = 2.2659

Looking at the z-value table we get 0.119.

8 0
3 years ago
Other questions:
  • Will a tablecloth that is 155 cm long cover a table that is 1.6 m long?
    12·2 answers
  • The application layer process that sends mail uses __________. When a client sends email, the client process connects with a ser
    10·1 answer
  • Networking and telecommunications technologies, along with computer hardware, software, datamanagement technology, and the peopl
    11·1 answer
  • What does it mean if my ninja blender power light is blinking?
    13·2 answers
  • Which of the following best describes the basic purpose of the internet?
    11·1 answer
  • What is the best way to use copyrighted material?
    14·2 answers
  • C++ Write a program that initially asks a user to enter two positive integer numbers a and b. If either a or are zero or negativ
    9·2 answers
  • Classify the following as cross-section or time-series data: Gross sales of 200 ice cream parlors in July 2009
    8·1 answer
  • The features used be of Computer that tell, it every field.​
    6·1 answer
  • What is computer fundamental ?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!