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
Help me if you do then you get 10 points and brainliest
stellarik [79]

The answer is A. The earth was formed 4.54 years ago, and during those first serveral hundred million years, oceans, continents started to form.

A) Precambrian time.

3 0
3 years ago
Which of the following Web sites would be MOST credible?
Luba_88 [7]
I think that A could be the correct answer. The others are not as credible as A.
4 0
3 years ago
Read 2 more answers
Which tab is used to insert a hyperlink onto a slide
Roman55 [17]
The tab used to instead a Hyperlink into a slide is the Insert tab under the “Links” group.
5 0
3 years ago
Read 2 more answers
True or false :Beyond fulfilling legal obligations, a diverse workplace offers many other benefits as well.
KengaRu [80]
The answer to your question is true.
7 0
3 years ago
How do you innovate or improve a product?
In-s [12.5K]

Answer:in order to innovate or improve a product you need to have an idea

Explanation:

5 0
3 years ago
Other questions:
  • what is a massive online storage that allows for access by any Internet connected device running a web browser and is used for l
    7·1 answer
  • HELP AS SOON IS A UNIT TEST WILL GIVE BRAINLIEST
    9·2 answers
  • The computers connected to the main server are called ______.
    14·2 answers
  • Given the strings s1 and s2 that are of the same length, create a new string consisting of the last character of s1 followed by
    10·1 answer
  • Anti-lock braking systems can significantly.... a. impede your braking stability. B. improve your braking stability. C. improve
    5·1 answer
  • ) A popular PivotChart that is used in Access is (Points : 4) column.
    9·1 answer
  • Write a C++ function using recursion that returns the Greatest Common Divisor of two integers. The greatest common divisor (gcd)
    14·1 answer
  • Which of the following best describes a feedback loop?
    11·1 answer
  • How do you customize calendar view​
    9·2 answers
  • Disadvantage of monolithic programming​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!