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
Which of the following are examples of how a company might use consumer data it had collected? a To decide what types of product
klio [65]

Answer:

A. To decide what types of products it should make

Explanation:

8 0
3 years ago
(9.10 Code Practice: Question 1)
V125BC [204]

Answer:

#include <iostream>  

#include <string>

using namespace std;  

int main() {

 string wOne, wTwo, temp;

 cout << "Enter a word:";

 cin >> wOne;

 cout << "Enter a word:";

 cin >> wTwo;

 

 temp = wOne;

 wOne = wTwo;

 wTwo = temp;

 cout << wOne << endl;

 cout << wTwo << endl;

 

}

5 0
2 years ago
Quired to the weight
expeople1 [14]

Answer:

The mechanical advantage is 0.25

This mechanical advantage shows that the force at which the deodorant sprays is the quarter of the applied effort, and hence the efficiency of your finger as a machine is 25%.

Explanation:

Given;

output force, F₂ = 15 N

input force, F₁ = 60 N

Mechanical advantage also known as force ratio is defined as the ratio of the output force (load) to the ratio of input force (effort).

M.A = \frac{0utput \ Force}{1nput \ Force} \\\\M.A = \frac{15 \ N}{60 \ N} \\\\M.A = 0.25

This shows that the force at which the deodorant sprays is the quarter of the applied effort, and hence the efficiency of your finger as a machine is 25%.

3 0
2 years ago
Identify the correct XHTML syntax for inserting an image as a hyperlink from the options provided. A. book.gif B. C. D.
mariarad [96]

Answer:

The Correct syntax for inserting an image as hyperlink is given in explanation section

Explanation:

To make an image act as a hyperlink, place the image element within the HTML anchor "<a></a>"  element.

The syntax of inserting image hyperlink in XHTML is given below.

<a href = "link_that_can_be_accessible"><img src="source of image" alt="display name if image not shown in the browser" border="0"/></a>

for example lets insert image as hyperlink

<a href="ajax.html"><img src="logo.gif" alt="AJAX" border="0" /></a>

The default appearance is a blue border around the image. Specifying border="0" removes the border around the image.

if you want to insert image from another folder then the image hyperlink looks like this:

<a href="ajax.html"><img src="/images/html5/logo.gif" alt="AJAX" border="0" /></a>

If you want to insert image from another server then image hyper link looks like this:

<a href="ajax.html"><img src="https://www.myExample.com/images/html5/logo.gif" alt="AJAX" border="0" /></a>

4 0
3 years ago
_____ separation strategies (e.g., attacking and sabotaging others) are used by those for whom co-cultural segregation is an imp
soldier1979 [14.2K]

Answer: Aggressive

Explanation:

Aggressive separation strategies are the technique that involves confrontation and intense feeling for separating something from others.

  • This technique includes action like attacking, assaultive, confronting etc.for segregation.
  • Co-culture segregation is separation of a subset of culture from large and major culture.In this culture, there can be more than two types of culture that are split forcefully through barrier.
  • Thus, co-culture segregation uses the methodology of aggressive separation.

5 0
3 years ago
Other questions:
  • Which Game Is Better &amp; Favorite For You?
    12·2 answers
  • What security protocol originally came with 802.11 equipment?
    11·1 answer
  • Identify the six components of an information system. Which are most directly affected by the study of computer security? Which
    8·1 answer
  • . Does Zuckerberg believe in the thought that “the endpoint is when you sell the
    15·1 answer
  • _______ can be used to prevent busy waiting when implementing a semaphore.
    15·1 answer
  • In C#Write the program SubscriptExceptionTest in which you use an array of 10 doubles. Write a try block in which you place a lo
    5·1 answer
  • Who is gossip girl.....
    8·2 answers
  • Which of these is the fastest transmission medium?
    11·2 answers
  • EMERGENCY- I am giving 55 points for this, please help. WITH working out
    7·1 answer
  • You are a teaching assistant for an introductory computer concepts course at your local community college. The instructor asks y
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!