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
What will be the output of the following code?
mojhsa [17]

Answer:

it schold be C = False di True True

5 0
3 years ago
Aaron is stating the main idea of what he read in his own words. He is _____.
Feliz [49]

Answer:

summarizing

Explanation:

when someone explains in their own words the main idea of a story, it is summarizing.

8 0
2 years ago
Read 2 more answers
Question # 4
arlik [135]

Answer:

Explanatio Morse code

4 0
3 years ago
Which technique records a signal with a video that uniquely identifies every frame of the tape using a time stamp in hours, minu
Nookie1986 [14]

Answer:

NTSC, Timecode

Explanation:

NTSC was used for television broadcasting in the USA, and some other countries. And it archives a video signal that exceptionally deciphers every frame of the tape with the assistance of the time stamp in unit time and frames. We have other options as well, which are PAL and SECAM. However, now and since 2013, these are being converted into the digital. The frame rate of the NTSC in the US was 29.97 fps. And this defines how good video you are going to receive.

And timecode is the signal that is recorded with the video that can quite exclusively figure out each frame of the tape with the help of the time stamp in unit time and frames.

3 0
3 years ago
Calculating mean for even number and use while loop<br>pleas help me ​
vladimir2022 [97]

Answer:

Here is my answer in Javascript

num = 0;   // Use to calcate the even numbers

loop = 10; // Use for the highest even number that will be calcated for

index = loop/2; // Calcate the size of the array based upon how many loops their

let arr = [index]; //Create array to store the even numbers

let i = 0; // Use to keep track of which on what number in the while loop we are on  

let total = 0; //Used to add up all of the even numbers

let mean = 0; //Used to calcate the mean of all even numbers

do {

 i = i + 1; //Keep track of what loop we are on

 num = num + 2; //Used to calcate the even number

 arr.push(num); //Push the num into a array

 total = total + arr[i]; //Calcate the total of the array

 mean = total / i; //Calcate the mean

}

while (num != loop);

//Output the result

console.log(mean);

8 0
3 years ago
Other questions:
  • ________ are devices used to send data between two networks.
    11·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    7·1 answer
  • "To take advantage of these developments in the digital world, new approaches, concepts,instruments, and methods are needed, whi
    8·1 answer
  • What do you call the process of translating statements written by a developer? What is the result of this process?
    6·1 answer
  • Which of the following Internet protocols is MOST important in reassembling packets and requesting missing packets to form compl
    11·1 answer
  • The primary benefit of a VPN that uses _________ is that an intercepted packet reveals nothing about the true destination system
    6·1 answer
  • Add a new row to a table by clicking in the
    10·1 answer
  • Why is it important to use random assignment when determining which research participants will comprise the different treatment
    12·1 answer
  • Which of the following is NOT one of the four benefits of using email?
    14·1 answer
  • System development life cycle
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!