Def pig_latin(word): """ ------------------------------------------------------- Converts a word to Pig Latin. The conversion is: - if a word begins with a vowel, add "way" to the end of the word. - if the word begins with consonants, move the leading consonants to the end of the word and add "ay" to the end of that. "y" is treated as a consonant if it is the first character in the word, and as a vowel for anywhere else in the word. Preserve the case of the word - i.E. If the first character of word is upper-case, then the new first character should also be upper case. Use: pl = pig_latin(word)

Answers

Answer 1

def pig_latin(word):

   if word[0].lower() in 'aeiou':

       word = word + 'way'

   else:

       t=''

       for x in range(len(word)):

           if word[x].lower() in 'aeiou':

               break

           if word[x].lower() == 'y' and x>0:

               break

           else:

               t+=word[x].lower()

       if word[0].isupper():

           word = word[len(t):]+word[:len(t)].lower()+'ay'

           word = word.title()

       else:

           word = word[len(t):]+word[:len(t)].lower()+'ay'

   return word

word = 'test'

pl = pig_latin(word)

print(pl)

I wrote my code in python 3.8. I hope this helps.

Answer 2

In the coding, if the first character of the word is upper-case, then the new first character should also be upper-case is written in python.

What is coding?

We connect with computers through coding, often known as computer programming.

def pig_latin(word):

  if word[0].lower() in 'aeiou':

      word = word + 'way'

  else:

t=''

      for x in range(len(word)):

          if word[x].lower() in 'aeiou':

              break

          if word[x].lower() == 'y' and x>0:

              break

else:

              t+=word[x].lower()

      if word[0].isupper():

          word = word[len(t):]+word[:len(t)].lower()+'ay'

          word = word.title()

      else:

          word = word[len(t):]+word[:len(t)].lower()+'ay'

  return word

word = 'test'

pl = pig_latin(word)

print(pl)

Therefore, the coding is written above.

To learn more about coding, refer to the link:

https://brainly.com/question/13390402

#SPJ2


Related Questions

what is the purpose of a router

Answers

Answer:

below

Explanation:

A router receives and sends data on computer networks. Routers are sometimes confused with network hubs, modems, or network switches. However, routers can combine the functions of these components, and connect with these devices, to improve Internet access or help create business networks.

Answer:

to help connect a network to a device

Explanation:

for example a WiFi router is needed so that a specific device can be able to be connect with the WiFi network

covert algebraic expressions into mathematical expressions s=ut+at² ​

Answers

Answer:

Python Expression:

u*t+ (1/2)* a*t** 2

Which example is most likely to cause scientific knowledge to change? A scientist tested a plant experiment and did not get the exact same results as the current scientific knowledge suggests. One scientist decides that current knowledge on a species is incorrect. New evidence and machines allow scientists to get a more in depth look at cancer. Scientists out west have experienced a shorter fall season this year and thus conclude that scientific knowledge on seasons needs to change.

Answers

Answer: New evidence and machines allow scientists to get a more in depth look at cancer.

Explanation:

Option A is incorrect because you cannot base scientific knowledge on the results of a single experiment. Also, the results will not be exactly the same as others but it should be close.

Option B is wrong because a scientific knowledge cannot change because someone decided that it should. Option D is incorrect as well because a persistent change needs to occur for scientific knowledge to be reviewed,

When new technology allows us to look further into things we were unable to look into before, knowledge will have a high chance of changing because we will now have more information to work with. Option C is therefore the best option.

Who can go about offering new services without taking legal risks?
operation analysts
marketing assistants
mechanics
attorneys

Answers

Answer:

B Marketing assistants.

Explanation:

They truly are the imposter. Bite me.

How many display settings are generally available on most laptops for dual display?
A five
B. four
c. three
d.Six​

Answers

Any Windows laptop will support two screens – at least, I've never heard of one that won't. Supporting three screens can be just as easy, or much trickier. It depends on the laptop, the graphics card (or integrated graphics), the graphics drivers, and perhaps the amount of memory available.

The file format is used for graphic files.

Answers

Answer:

.GIF

Explanation:

GIF or Graphics Interchange Format files are widely used for web graphics, because they are limited to only 256 colors, can allow for transparency, and can be animated. GIF files are typically small is size and are very portable.

Find and explain about the calculating devices used in history. ​

Answers

Answer:

The earliest known calculating device is probably the abacus. It dates back at least to 1100 bce and is still in use today, particularly in Asia. Now, as then, it typically consists of a rectangular frame with thin parallel rods strung with beads.

please answer fast..​

Answers

Answer:

a. False.

b. True.

c. False.

d. False.

Explanation:

a. False: Data stored in RAM are called firmware. It's the data stored in read only memory (ROM) are called firmware.

Radom Access Memory (RAM) can be defined as the main memory of a computer system which allow users to store commands and data temporarily.

Generally, the Radom Access Memory (RAM) is a volatile memory and as such can only retain data temporarily.

All software applications temporarily stores and retrieves data from a Radom Access Memory (RAM) in computer, this is to ensure that informations are quickly accessible, therefore it supports read and write of files.

b. True: a register is a temporary storage device within the central processing unit (CPU) of a computer system. Thus, it is designed to quickly accept, store and transfer data or instructions being used on a computer system.

c. False: the result obtained after data processing is given by input devices. Any result obtained after data processing is given by output devices such as speakers, monitor, projector, etc.. Input devices such as keyboard, mouse, scanner, etc., are used for entering the data into a system.

d. False: E-shopping allows us to make deposits, withdrawal and pay bills with the click of a mouse.

E-shopping can be defined as a marketing strategy that deals with meeting the needs of consumers, by selling products or services to the consumers over the internet.

This ultimately implies that, E-shopping is strictly based on the buying and selling of goods or services electronically, over the internet or through a digital platform. Also, the payment for such goods or services are typically done over the internet such as online payment services.

ANY ADVICE?
i have to spend summer ( and the next 4 years) with a family who hates me. what should I do.

Answers

Answer:

Talk to a close friend or adult that you trust and have the power and explain to them why you don't want to go. Good luck.

Answer:

You should try talking to a person that could maybe help you or a family member that you trust who will let you stay with them for the summer and 4 years. If you don't have any one else I would try being nice, or just ignore them and live on with your life. I don't really know what else to say sense I don't know your life experience.

Explanation:

Ask how many apples the user wants. Ask how many people the user will share the apples with. Find out how many apples will remain if you share the apples equally. Hint: use modulus %.

Answers

Answer:

The program in Python is as follows:

apples = int(input("Apples: "))

people = int(input("People: "))

apples%=people

print("Remaining: ",apples)

Explanation:

This gets the number of apples

apples = int(input("Apples: "))

This gets the number of people to share the apple

people = int(input("People: "))

This calculates the remaining apple after sharing the apple evenly

apples%=people

This prints the calculated remainder

print("Remaining: ",apples)

Please solve in 5 mins very fast​

Answers

Answer:

a. virtual reality

b. Master Boot Records

c. Primary function of a router

d. zoom

Explanation:

The first one is gonna be B and the second is gonna be C

Submit your business presentation that clearly compares and contrasts three different cell phone service plans..


I NEED IT DONE BY 5/24!!


I WILL PAY!!!!


100 points also


AND I WILL MAKE YOU BRAINLIEST!!

Answers

Answer:

My three phone service plans are T-Mobile, Verizon, and At&t.

How All of them compare is that the are phone companies and phone services. How T-Mobile contrast with Verizon is that T-mobile has  Bigger Nationwide 5g while Verizon has 5g for big cities, At&t doesn't have that much 5g yet. T-mobile has since combined with Sprint making it a bigger company. if you get Tello unlimited data from T-Mobile you pay $39 a month that means 468 dollars a year. Verizon's Unlimited plans are $80 a month that equals 960 a year. AT7T is much cheaper if you get the AT&T unlimited starters which is 35 a month so 420 a year. I  will go for T-mobile because it's not that cheap or expensive and it is very reliable.

Explanation:

Mark as Brainliest

Our ways of communicating in society will change mostly due to: O A. our desire to be isolated. O B. a population decline. O O C. changes in technology O D. alterations in our brains.​

Answers

Answer:C

Explanation:

What menu allows you to add different features to your document?

Answers

Answer:

The Insert Menu. The insert menu is used to place various objects into your document, such as page numbers, pictures, symbols, comments and other objects. Commands include break, date and time, field, symbol, reference, web component, text box, file and hyperlink.

hope it helps ya mate!ت︎

Create a paper of at least 1,800 words describing the situation you selected and explaining the logic that would support an array.

Answers

Answer:

I dont know about 1800 words but I sure can tell you abit about array

Explanation: Array in simple sense refers to a collection of similar data. It holds data which is homogeneous in nature, meaning they are all alike. The use of array provide a lot of advantages in the fields of computer programming. When you declare a variable for an array, you can store as much data as you wish in the same variable without having to declare many variables. A 2X2 dimensional array can also be used in programming which represents matrices as well. The search process in an array too is really convenient and time saving. Also in an array, accessing an element is very easy by using the index number.

What kind of variable will be created by a line of code that reads num1 = int(input("Please enter your favorite number.")) ? Group of answer choices a string a float an integer a generic

Answers

Answer:

An integer

Explanation:

Given

num1 = int(input("Please enter your favorite number."))

Required

The variable type

In Python, when an input is gotten through

var-name = data-type(input(Prompt))

The variable var-name assumes the datatype data-type

This implies that:

num1 = int(input("Please enter your favorite number."))

num1 will assume integer datatype

Briefly discuss the aesthetics and ergonomics of a hydraulic jack. First explain what these
terms mean and then discuss their application on a hydraulic jack.​

Answers

Answer:

For this model, aesthetics is defined as a measure of how attractive a product appears, and ergonomics is how well a product feels when used/held. ... Two important types of defects, part flash and crush, will be used to define ergonomic and aesthetic PA's, respectively.

Antwon is building his technical writing portfolio.He created the following checklist: •check whether any part of the portfolio violates a a nondisclosure agreement. •check whether the content in the portfolio corresponds to the job requirements. •make sure that I am clear about my role in creating each document in the portfolio.
Which element of the portfolio does this checklist best apply to?
A.Cover letter
B.resume
C.templates
D.writing samples
E.task summaries

Answers

Answer: A. Cover letter

Explanation:

The element of the portfolio that this checklist best apply is the cover letter. The cover letter is a document that a job applicant will send along with his or

her resume in order to provide additional information with regards to the skills and experience that the person possesses and why the person is qualified for the position.

Since Antwon checks whether the content in the portfolio corresponds to the job requirements and also made sure that his role in creating each document in the portfolio is clear, this is a cover letter.

A company has recently installed a new computer network. The operating philosophy adopted by a new network administrator was to establish an open system that would foster work group data sharing, flexible access, and minimal inconvenience to the network users

Answers

Answer: Hi your question is incomplete attached below is the complete question and written below is the desired question you want to ask

question : Discuss the potential consequence and give a prevention technique

answer :

Consequence : Access to unauthorized data

prevention :  assign privileges based on job description of  employees

                      constant review of privileges

Explanation:

The danger with assigning privileges' based on department or functional affiliation is that some employees might have access to departmental data that they are not supposed to have access to and this might be used for criminal/fraudulent  purposes

prevention technique

The Network admin should assign privileges' to employees based on Job description of and not Functional affiliation or departmental affiliationConstant review of employees job description and privileges by an Auditor

6x-7=2x +1 someone help​

Answers

6x-7=2x+1

-2x. -2x

4x-7=1

+7. +7

4x=8

÷4. ÷4

x=2

the answer is 2 !!!!!!

1. It is another multimedia type you can work with in PowerPoint. If you have this on
your computer like an MP3 or WAV file, you can easily add them to your presentatie
A. Audio
C. Effects
B. Computer
D. Video
2. The simplest way to add an image to PowerPoint
A. Copy and Paste
C. Insert Image
B. Edit Presentation
D. Resize and Click
3. It is a stand-alone presentation that includes information presented with slides,
video, or digital representations and includes sound which might be a narrative,
music or sound effects.
A. Automated Presentation
C. Multimedia Presentation
B. Information Communication
D. Technology Presentation
1c​

Answers

Answer:

1. Audio.

2. Copy and paste.

3. Multimedia presentation.

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

1. Audio is another multimedia type or format that an end user can work with in PowerPoint. If end users have an audio file such as MP3 or WAV file on their computers, they can easily add them to their presentation using Microsoft PowerPoint.

2. In Microsoft PowerPoint, one of the simplest way to add an image to a presentation is to copy the image from a directory and paste it on the work area.

3. Multimedia presentation is a stand-alone presentation which typically involves presenting informations with graphics, slides, texts, video, or digital representations and sound which might be a narrative, music or sound effects.

what is the software

Answers

Answer:

the programs and other operating information used by a computer.

Explanation:

Answer:

the programs and other operating information used by a computer

Which of the following is NOT a common tactic that scammers use to
steal personal information?

Answers

I can guess this.

Lets say you got a " virus " on your computer and said to call this number 111-111-111-1111

" Hello sir, how may we help you today " This can be a robot, and can show maybe that it isnt a scam and can be seen as a message bot so they can record, and send you to the correct line for your issue.

You say " I got this virus on my computer and it said This computer has a virus known as a " insert virus name " and to call this number.

How would you keep executives informed about the progress of a project?
with a newsletter
via snail mail
by word of mouth
no need to, just keep it a secret

Answers

by word of mouth is how i would keep executives informed

Answer:

out of these options, only "by word of mouth" makes sense.

Explanation:

but in today's networking world there should be normally a tool, where the project team updates the information (ideally on a daily basis), and peers, managers, executives and other interested parties can see the updated summary information for their purpose.

but when and how should they be "triggered", if something happened that jeopardizes the business plan ?

immediately, in person. don't wait for any process and practice steps to deliver the information. valuable time would get lost. and I guess, that is what was meant by the question.

Create a new program in python that:

Defines a function called cities()

Ask the user how many cities they are in England and store their response in a variable called answer

Check if their answer was equal to 51

If it was, output well done!

else, output incorrect!

Calls the cities() function at the end to run it.

Answers

Answer:

here

Explanation:

If you want to display something on screen you can use the print() function. ... An example of code that will ask the user to enter their name and display it on ... stores it in a variable called city city = input("What is the capital city of England ... If you want to perform a format check in Python you will need to make use of a library.

Upload your 500-word story that describes one law, including how it relates to digital media, and summarizes a case that went to the courts and the stand of the parties involved.

Answers

Answer:

Communications Decency Act (CDA).

Explanation:

Communications Decency Act (CDA) is a law that relates to the digital media which is made to regulate content related to sex on the Internet. The person who sends any type of sexual content to a female or any individual so she can take sender to the court and he will be punished on the basis of Communications Decency Act (CDA). In this situation, senders and receivers are the two parties who are involved in this crime. The sender commit the crime whereas the receiver is innocent and was affected from the act so the sender receives the punishment according to the law.

Lin received 200 new laptops to be issued to company employees. Lin was asked to set them up and distribute them to everyone on a list provided by his supervisor. Lin has completed installing all the software on each computer and is ready to distribute them, but he needs to keep track of who received each laptop. ​ How can Lin keep track of all the laptops?

Answers

Answer:

Inventory Management Documentation

Explanation:

In this scenario, Lin would need an Inventory Management Documentation. This is a document that holds all of the laptops hardware information, as well as who it was given to. This includes the laptop's model, serial number, size, condition, and for the client it includes the client's name, day it was given, time, etc. Such documentation is usually created with inventory management software and would help Lin keep track of all of the laptops efficiently.

In what way, if any, does digital media influence the ability for a smaller business to compete with a larger business? Digital media helps small businesses because it gives them access to resources that only large companies had in the past. Digital media has little effect on the ability for a small business to compete with a larger business because all businesses benefit equally. Digital media actually damages the ability for a small business to compete with a larger business because it provides larger businesses with more opportunities. Digital media helps small businesses because it increases globalism, which is good for small businesses in terms of competition.

Answers

Answer: Digital media helps small businesses because it gives them access to resources that only large companies had in the past.

Explanation:

Digital media refers to the media that depends on electronic devices in order to be created, distributed or stored.

Digital media gives smaller business the ability to compete with the larger ones as it gives them access to resources that only large companies had in the past.

Dwayne wants a variable called "name" to appear in the interpreter and does not want a space after it. Which of these should be used to make that happen? Name, name) name+ name.

Answers

Answer:

name + name

Explanation:

When assigning values to a Variable  in python, the + operator sums the values assigned to the variable into a single value hence there won't be any space between the values assigned .

Name + Name = NameName    in python programming

Write a letter to the editor of a national newspaper complaining about the bad roads in your town or city, and giving at least three reasons why something should be done urgently about them.​

Answers

Answer:

Dear editor.

I am writing this letter to alert you to the serious problems we are facing on the main highways of our city, where traffic is completely neglected and the number of accidents has grown at an alarming rate.

Our highways have holes in the roads, lack of signage, traffic lights with malfunction and lack of traffic guards. All of this has left the traffic in the city a real chaos and has caused a great risk to the lives of drivers and pedestrians.

We went to the city hall to ask for a solution to this problem, but we didn't get an answer. For this reason, I come, humbly, to ask you to address this problem in your newspaper so that the attention of the authorities is brought to your attention.

Thank you in advance for your time and consideration.

Regards,

(Your name)

Other Questions
Need help! Does anyone know how to do this type of math? (It's geometry) Beth went to the grocery store, and Stacy went to the library.The sentence above is a A. compound-complex sentence. B. complex sentence. C. simple sentence. D. compound sentence. What role did the American woman play in the civil rights movement help anyone?? need to get this done i need help with geometry 6x-7=2x +1 someone help Seriously I don't know what's wrong with my menstruation cycle or period so technically I have an irregular period just like my mum don't blame me we are just an irregular period cycle XD anyway so I started my period 3-4 days ago and when I look at it there were many period blood so I changed into pad immediately and a few minutes later there was just a light period no cramps and a few hours later brown blood with female reproductive organ with a stinky smell so I don't know what the heck is going on with my ovary could someone help me to identify if this is period or not but its really stressful :( what is the purpose of a router PLZ HELP ME , PLZ HELP AND PLEASE, PLZ HELP JUST PLZ HELP THANK YOU FOR YOUR TIME Use the box plot to explain what you know about the spread of this data set. is "war and terrorism had become child's play" a metaphore There is an active Telnet connection from a client (10.0.2.5) to a Telnet server(10.0.2.9). The server has just acknowledged a sequence number1000, and the client has just acknowledged a sequence number 3000. An attacker wants to launch the TCP session hijacking attack on the connection, so he can execute a command on the server. He is on the same local area network as these two computers. You need to construct a TCP packet for the attacker. Please fill in the following fields: Source IP and Destination IP Source port and Destination port Sequence number The TCP data field. Types of services that are most commonly exported by the United States include each of the following except:A. police services,B. financial servicesC. medical services.D. entertainment services. HELPPPPPPPPPPP Find the volume of the cone.Either enter an exact answer in terms of pi or use 3.14pi and round your final answer to the nearest hundredth. how to do my English homework faster Someone please me help me Normal pressure of healthy men and women Find parametric equations through point P=(2,2,7) in the direction of the vector v = (44, 14, -20)? 7. Jeremiah is going to the local arcade with $32 in his wallet to spend. He plans to bowl one game and play some arcade games. A game of bowling costs $11, the bowling shoe rental is $3.75, and the arcade games cost $0.75 each. Write and solve an inequality to find the number of arcade games Jeremiah can play. Use the information given to form TWO logical sentences with two object pronouns to represent both ways that the sentence can be written. Be sure to use the present progressive form of each verb and include the direct and indirect object pronouns in the correct placement. Follow the model:Modelo: yo / escribir / la carta / Juan[a] Yo se la estoy escribiendo. [b] Yo estoy escribindosela.nosotros / preparar / la presentacin / Uds.t / dar / la informacin / nosotrosyo / traer / el libro / tmi amiga / escribir / las ideas / yola profesora / explicar / la leccin / al estudiante Find the value of x..a. 20.6B. 11.2C. 125D. 19.4