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
Write a Python program that inputs an integer between 0 and 1000 and adds all the digits in the integer. For example, if integer
nignag [31]

I've included my code in the picture below.

5 0
3 years ago
Describe four features of a well designed input screen
Sladkaya [172]

Answer:

A well design input screen should:1.Be titled2.Navigation aids should be used

Explanation:

3 0
3 years ago
Read 2 more answers
Which function converts the users input to a number without a decimal?
sertanlavr [38]

Answer:

Explanation: integer is the meaning of int() if you payed attention to programming class, int() would be a WHOLE number and not a decimal number, 2nd of all, a decimal number would be float() so the answer is int() hope i helped!

Explanation:

hope this helped byyyyyyyyyyye

6 0
3 years ago
Int [] val = { 3, 10, 44 };
Shtirlitz [24]

Answer:

4) 3 11 44

Explanation:

Given data

int [] val = { 3, 10, 44 };

The total number of parameters of given array are 3, so total length of array is also 3.

The indexing of array starts with '0', Therefore the indexes of array with length zero are: {0,1,2}

The value of array at index 0 is = 3

similarly,

value at index 1 = 10

value at index 2 = 44

Here, Int i = 1 is storing the value '1' in integer variable i.

In addition to that, any value of index 'i' of an array is selected using array[i].

Therefore,

val[i] is selecting the value of array located at index '1' because i = 1.

val[i] = val[1] = 10

val[i]+1 is selecting the value of array located at index 'i' that is (1) and adding 1 to it

=> val[i] = 10

=> val[i]+1 = 10+1 = 11

Finally,

val[i] = val[i]+1; is copying the val[i]+1 = 11 to value placed at index 1 (10). Hence, the output would be {3 11 44}. So 4th option is correct.

6 0
3 years ago
Bailey wants to add file protection to a document she has created. She wants to restrict users from changing the content she has
jonny [76]
Id say (B) File, Permissions, Restrict Editing, Editing Restrictions, Comments, Start Enforcement, then enter her password

However much you may want your reviewers to make comments and suggest changes in a document, there may be times when you want to restrict them from changing the content you have created. To restrict formatting in a document, you can click restrict formatting in the protect section of the review tab and follow the procedure in the answer above.


8 0
3 years ago
Read 2 more answers
Other questions:
  • What provides access to the internet?
    6·1 answer
  • Why Unicode is the standard way of converting binary to text?
    8·1 answer
  • Is a router on the local network that is used to deliver packets to a remote network?
    15·1 answer
  • 120
    14·1 answer
  • Write the definition of a function reverse, whose first parameter is an array of integers and whose second parameter is the numb
    15·1 answer
  • + Use for loop to print numbers from 100 to 10
    11·1 answer
  • Does anyone know a good reason WHY to change your username.
    5·1 answer
  • Qr code is more developed than barcode​
    11·1 answer
  • Your program will be used by many departments at the university. Your comments will be important to their IT people. What would
    13·1 answer
  • Which quality should an experiment have to be replicable and valid? O clearly detailed results O a well-cited research paper O s
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!