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
baherus [9]
3 years ago
15

Your program Assignment Write a program that reads a sentence as input and converts each word to "Pig Latin". In one version of

Pig Latin, you convert a word by removing the first letter, placing that letter at the end of the word, and then appending "ay" to the word. Here is an Example: English: I SLEPT MOST OF THE NIGHT Pig Latin: IAY LEPTSAY OSTMAY FOAY HETAY IGHTNAY

Computers and Technology
1 answer:
xxTIMURxx [149]3 years ago
5 0

Answer:

theSentence = input('Enter sentence: ')

theSentence = theSentence.split()

sentence_split_list =[]

for word in theSentence:

  sentence_split_list.append(word[1:]+word[0]+'ay')

sentence_split_list = ' '.join(sentence_split_list)

print(sentence_split_list)

Explanation:

Using the input function in python Programming language, the user is prompted to enter a sentence. The sentence is splited and and a new list is created with this statements;

theSentence = theSentence.split()

sentence_split_list =[ ]

In this way every word in the sentence becomes an element in this list and individual operations can be carried out on them

Using the append method and list slicing in the for loop, every word in the sentence is converted to a PIG LATIN

The attached screenshot shows the code and output.

You might be interested in
What role does the automated surface observing system.
Ilya [14]

Answer: The ASOS systems serves as the nation's primary surface weather observing network. ASOS is designed to support weather forecast activities and aviation operations

6 0
2 years ago
Read 2 more answers
How is the numeric string that makes up a digital signature created?
Nat2105 [25]
<span>A numeric string is created by a cryptographic algorithm, which is called a hash that is used to validity of a message or authenticity of a document. The signature is verified by an algorithm that uses the stated owner of the signature's public key to accept or reject the authenticity of a signature. A certification authority's digital signature is used to verify the authenticity of digital certificates and other documents in a PKI.</span>
7 0
3 years ago
When you see an ad on social media that relates to your profile or something
sesenic [268]

Answer:

Tritium BF

Explanation:

5 0
2 years ago
Read 2 more answers
Which type of chart is used to chart progress over time?
Morgarella [4.7K]

Answer: Timeline

Explanation:

6 0
3 years ago
Microsoft words spell checker
Degger [83]
The answer it is A i hope is good
3 0
3 years ago
Other questions:
  • A factory has a dedicated room just for computers. They are generally kept locked in the room and are never directly used by use
    5·2 answers
  • What does the "configure dhcp options for proxy dhcp" option do?
    13·1 answer
  • The expressionvecCont.empty() empties the vector container of allelements.
    13·1 answer
  • Which method can help you prevent RSI while using a keyboard?
    14·1 answer
  • A technician is assigned a task to configure a new server with six hard drives. The senior administrator requested the technicia
    13·1 answer
  • The first and second numbers in the Fibonacci sequence are both 1. After that, each subsequent number is the sum of the two prec
    6·1 answer
  • Can somebody help me with this please
    6·2 answers
  • he primary purpose of a database query is to a. find and retrieve specific information. b. correct information in the database.
    9·1 answer
  • You have this code in your program.
    10·1 answer
  • Using programming libraries is one way of incorporating existing code into new programs.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!