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
Sedbober [7]
3 years ago
14

Write an application that accepts a word from a user and converts it to Pig Latin. If a word starts with a consonant, the Pig La

tin version removes all consonants from the beginning of the word and places them at the end, followed by ay. For example, cricket becomes icketcray. If a word starts with a vowel, the Pig Latin version is the original word with ay added to the end. For example, apple becomes appleay. If y is the first letter in a word, it is treated as a consonant; otherwise, it is treated as a vowel. For example, young becomes oungyay, but system becomes ystemsay. For this program, assume that the user will enter only a single word consisting of all lowercase letters.
Computers and Technology
1 answer:
Reptile [31]3 years ago
5 0

Answer:

Written in Python

word = input("Word: ")

if(word[0]=='a' or word[0]=='e' or word[0]=='i' or word[0] =='o' or word[0]=='u'):

     print(word+"ay")

else:

     a = word[1:]

     print(a+word[0]+"ay")

Explanation:

<em>The program was written in Python and I've added the explanation as an attachment; where I used comments as explanations</em>

Download txt
You might be interested in
Power brakes:
IgorLugansk [536]
The answer is B becausePower brakes are a system of hydraulics used to slow down or stop most motor vehicles. It uses a combination of mechanical components to multiply the force applied to the brake pedal by the driver into enough force to actuate thebrakes and stop a vehicle that can weigh several tons.
5 0
3 years ago
Read 2 more answers
152<br>what is the role of Computer as<br>transforming agent in the<br>Information society.​
hichkok12 [17]
I have a question what grade are you in
8 0
2 years ago
The help desk received a call from a user who cannot get any print jobs to print on the locally shared printer. While questionin
erma4kov [3.2K]

Answer:

a. Power cycle the printer.

Explanation:

Power Cycle: To unplug the printer and restart it, is called power cycling. The peripheral devices often tend to stop working and the cause of this is not always easily figured out. So the first and easiest way that can be done to fix this issue is to run a power cycle. For this, you have to turn off the printer and unplug it. Then wait for a few seconds (at least 30) and plug in the printer again. Turn the printer on. Power cycle helps to resolve many basic issues. It is the easiest step to take before checking the printer cable, reinstalling printer or resetting the print spooler.

4 0
2 years ago
nder a Huffman encoding ofnsymbols with frequenciesf1, f2, . . . , fn, what is the longest a codewordcould possibly be
Natasha2012 [34]

Answer:

The longest codeword that could possibly be for "n" symbol is n-1 bits.

Explanation:

From the given information:

Suppose we are to consider a set of frequencies \mathtt{f_1,f_2,f_3 ...,f_n}, for which f is a symbol for the length n. Therefore, the longest codeword that could possibly be for "n" symbol is n-1 bits.

However, during the encoding for "n" in conjunction with n-2, then the possibilities for n are; \mathtt{\dfrac{1}{2}, \dfrac{1}{4}, ... \dfrac{1}{2^{n-2}}}

We can conclude that the longest codeword that could possibly be for "n" symbol is n-1 bits.

5 0
2 years ago
What does DOS stand for?
anygoal [31]

Answer:

Disk Operating System

Explanation:

"DOS is a platform-independent acronym for Disk Operating System which later became a common shorthand for disk-based operating systems on IBM PC compatibles."

5 0
3 years ago
Other questions:
  • A custom date format set for a date/time field that contains the symbols mmm/dd/yy would display the date as ____.
    12·1 answer
  • Text, numbers,graphics, sounds entered into a computer's memory during input operations are referred to as
    11·1 answer
  • Asian-American men are often represented in the media as _____.
    8·2 answers
  • What happens when you press the Enter key at the end of a line of bulleted text?
    14·2 answers
  • You buy a new workstation that features an embedded RAID controller on the motherboard. You want to setup hardware RAID 10. How
    10·2 answers
  • . Select the advantages of RAID-5 relative to other RAID schemes. (MAY SELECT MULTIPLE)
    7·1 answer
  • Apply the Fill - Teal, Accent 4, Soft Bevel text effect (the 5th
    12·1 answer
  • PLSS HELP ASAP ILL GIVE BRAINLIEST THANKS
    11·1 answer
  • Patricia Works in a coffee shop and manages the inventory of items.for each item she needs to recover the quantity in stock and
    12·1 answer
  • Imagine that you work for an organization that has no Internet use policy. Employees use the Internet in whatever way they want
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!