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
Fiesta28 [93]
3 years ago
8

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:
Scorpion4ik [409]3 years ago
7 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
g The reciprocal Fibonacci constant ψ is defined by the infinite sum: ψ=∑n=1 [infinity] 1 Fn Where Fn are the Fibonacci numbers
timama [110]

Answer:

see explaination

Explanation:

MATLAB script:

% MATLAB script that calculates reciprocal Fibonacci constant Ψ

% Initial Values

a0 = 1;

a1 = 1;

% Looping variable

i = 2;

% Reading n value from user

n = input(' Enter n value: ');

% Initializing sum

sum = (1/a0) + (1/a1);

% Loop till i reaches n value

while i <= n

% Finding term in Fibnocii series

a2 = a0 + a1;

% Accumulating Sum

sum = sum + (1/a2);

% Updating previous terms

a0 = a1;

a1 = a2;

% Incrementing loop variable

i = i + 1;

endwhile

% Printing result

printf("\n Reciprocol Fibnocii Constant: %f \n", sum);

See attachment for sample output

5 0
3 years ago
Which layer defines an interface that applications can use to request network services, rather than referring directly to applic
Scrat [10]
Explain what is meant by a limited data set and how this HIPAA rule may affect medical assistants
4 0
3 years ago
Rikki has had several problems at work recently. Her printer isn't printing correctly, copies from the copy machine come out wit
Ghella [55]
Create a maintenance schedule 
3 0
3 years ago
Read 2 more answers
Which directory in the FHS stores programs and configuration information that can only be executed and modified by the root user
dlinn [17]

Answer: /sbin

Explanation:

In Linux, FHS describes the directory content and the way in which Operating System files are displayed to the user.

/sbin is a directory that contains executable programs. s/bin is the short form of system binaries. System binaries require root rights to perform specific tasks. /sbin contains binaries that are crucial to boot the system and also to recover and restore the system. /bin directory also contains the commands to boot the system but the main difference between both is that /sbin programs can only be executed by the root user. Examples are fdisk, fsck, root,halt, init, grub, ifconfig.

4 0
3 years ago
Authenticating information can be something a user knows, like a password; something a user has, like a smart card; or something
xenn [34]

Answer:. True

Explanation:

yes it is true in my opinion

8 0
2 years ago
Other questions:
  • The main differences between laptops and desktop computers other than size and portability.
    14·1 answer
  • In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the
    12·1 answer
  • Who is good with Introduction to photography? I don’t know nothing about cameras if you do please contact me ASAP
    13·1 answer
  • The most common type of local correction system is
    11·1 answer
  • Which of the following STEM discoverers developed a new type of computer hardware?
    11·1 answer
  • When RadioButton objects are contained in a group box, the user can select only one of the radio buttons on the panel.
    12·1 answer
  • When performing actions between your computer and one that is infected with a virus, which of the following offers NO risk of yo
    11·1 answer
  • Is the jane austen pride and prejudie a primary source
    6·1 answer
  • Justify any FOUR significant factors to remember when installing your motherboard
    7·1 answer
  • 1. (A) What do you mean by computer? Discuss the use of<br> computer in daily life.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!