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]
2 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]2 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
Why OSI is called open system?
MAXImum [283]

Answer: OSI system is called Open System Interconnection because It provides the collection of protocols for the connection of different system to connect with  any dependence on any other system or network.

Explanation: Open system interconnection establishes a connection between the different system for the communication purpose using several protocols and software standards .It has no dependency or any network or other system to do the functioning and works using the seven layers of the OSI architecture.Thus, that is why OSI system known as open system.

7 0
3 years ago
What is faster C++ or go lang
alukav5142 [94]

Answer:

C++

Explanation:

3 0
3 years ago
What is <html>
ipn [44]

the opening tag for an HTML document

8 0
3 years ago
Read 2 more answers
What should you do if ads keep popping up on your computer when using Google Chrome?
romanna [79]
I think it’s B.. I’m pretty sure
8 0
3 years ago
What symbol do we use to denote a character?
pychu [463]

Answer:

'Single Character'

Explanation:

A Character, commonly abbreviated as "char", is a computer symbol, letter, or number. A keyboard is an input device that inputs a character when a key is pressed.

5 0
2 years ago
Other questions:
  • What percentage of jobs work in the entertainment industry?
    13·1 answer
  • The Sumif formula will add numbers together from a range of numbers ONLY IF they contain the criteria. True or false
    8·1 answer
  • Kai is a software engineer who started his own IT consulting firm. His friend, Catalina, is the owner of a store that sells offi
    13·2 answers
  • You can use this effect to break a color into a percentage of its full strength.
    13·1 answer
  • Which of the following is used to describe an authentication scenario in which a user logs in using a PIN and a security token
    7·2 answers
  • __________ can be used to replace internal network addresses with one or more different addresses so the traffic that actually t
    9·1 answer
  • Of the key reasons for creating organizational units which of the following is not one of them?
    13·1 answer
  • Anyone got the edmentum computer programming post test answers?
    6·1 answer
  • What is string literal in Java?
    5·1 answer
  • The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!