please make it with Python. Include a docstring for your functions. PART A: wordlist contains words. Some
Fantastic news! We've Found the answer you've been seeking!
Question:
please make it with Python.
Transcribed Image Text:
Include a docstring for your functions. PART A: wordlist contains words. Some of these words contain only letters, other words might contain other characters such as digits, punctuation marks etc. You will read this input file and pluralize only the words that is made up of only letters and will print out the pluralized form of these words in to an output file called pluralWordList.txt. input file: cherry 6s115 python Dr.Java output file: cherries pythons students pennies section01 8Sections student penny Mr Bullock word_list Hello! system The program should include the following functions in a script called doc_module.py isAll Letter: the function takes a String as a parameter and returns true if the string is only made up of letters; otherwise, it returns false. systems 41.67% of the words are pluralized pluralizeWord: the function takes a String as a parameter and returns the plural form of the noun. The function will handle only two rules of pluralization. If the word is ending with "y", the plural form drops the "y" and ends with "ies" (cherry to cherries). In all other cases, "s" is added to the word (for example, orange to oranges) pluralizeAllWords: the function takes an input filename, an output filename, it reads the words in the input file. For each of the words, the method checks whether the words is made up of only letters by calling the method isAllLetter. If the word is made up of all letters, it calls the pluralizeWord method with the word as a parameter to get the plural form. Then it writes the plural form of the word into the output file. The function will find and write the percentage of the words that are pluralized to the end of the output file. PART B: Write a script, yourname_doc.py that calls pluralizeAllWords function to pluralize the words in 'wordList.txt and create a new file for the successfully pluralized words as 'pluralWordList.txt. Include a docstring for your functions. PART A: wordlist contains words. Some of these words contain only letters, other words might contain other characters such as digits, punctuation marks etc. You will read this input file and pluralize only the words that is made up of only letters and will print out the pluralized form of these words in to an output file called pluralWordList.txt. input file: cherry 6s115 python Dr.Java output file: cherries pythons students pennies section01 8Sections student penny Mr Bullock word_list Hello! system The program should include the following functions in a script called doc_module.py isAll Letter: the function takes a String as a parameter and returns true if the string is only made up of letters; otherwise, it returns false. systems 41.67% of the words are pluralized pluralizeWord: the function takes a String as a parameter and returns the plural form of the noun. The function will handle only two rules of pluralization. If the word is ending with "y", the plural form drops the "y" and ends with "ies" (cherry to cherries). In all other cases, "s" is added to the word (for example, orange to oranges) pluralizeAllWords: the function takes an input filename, an output filename, it reads the words in the input file. For each of the words, the method checks whether the words is made up of only letters by calling the method isAllLetter. If the word is made up of all letters, it calls the pluralizeWord method with the word as a parameter to get the plural form. Then it writes the plural form of the word into the output file. The function will find and write the percentage of the words that are pluralized to the end of the output file. PART B: Write a script, yourname_doc.py that calls pluralizeAllWords function to pluralize the words in 'wordList.txt and create a new file for the successfully pluralized words as 'pluralWordList.txt.
Expert Answer:
Answer rating: 100% (QA)
Question Code for docmodulepy def is AllLetterstr This functio... View the full answer
Related Book For
Managerial Economics
ISBN: 978-0133020267
7th edition
Authors: Paul Keat, Philip K Young, Steve Erfle
Posted Date:
Students also viewed these general management questions
-
An amusement park, whose customer set is made up of two markets, adults and children, has developed demand schedules as follows: The marginal operating cost of each unit of quantity is $5. (Hint:...
-
An electronic device is made up of two components A and B such that the device would work satisfactorily as long as at least one of the components works. The probability of failure of component A is...
-
The labor force is made up of people at least 16 years of age who are either employed or actively looking for work. The participation rate is the percentage of people at least 16 years of age who are...
-
If the price increased by 40%, what will happen to EOQ? (Assumed the original demand level and ordering cost remain constant). What is the elasticity of EOQ with respect to price? (That is, the...
-
On a piece of graph paper, plot the quantity of lamb consumed by Ms. Turner along the vertical axis and the quantity of rice she consumes along the horizontal axis. Draw the indifference curve that...
-
Use the following information about the cash flows of Ferron Company to prepare a complete statement of cash flows (direct method) for the year ended December 31, 2017. Use a note disclosure for any...
-
A simplified schematic drawing of the carburetor of a gasoline \((S=0.75)\) engine is shown in Fig. P5.96. The throat area is \(0.5 \mathrm{in.}^{2}\). The running engine draws air downward through...
-
Korvanis Corporation operates a Medical Services Department for its employees. Charges to the companys operating departments for the variable costs of the Medical Services Department are based on the...
-
Explain the important concepts of Relevant Cost, Opportunity Cost, and Sunk Cost used in incremental analysis.
-
You first need to download the spreadsheet with stock price and return data from the Assignments tab in Canvas and access the spreadsheet tab titled "Stock Price Data". This tab contains monthly...
-
In an examination, the probability that a student will pass Mathematics is 0.8. If the student passes Mathematics, the probability that the student will pass Chemistry is 0.9. If the students fails...
-
Discuss how decreasing prices as a way to eliminate competition could result in more competition, and give examples of how competitors could use the price decrease to reduce market share.
-
INESS MUNICATION ESS PRODUC Introductions in a Formal Report: Background Contextual information for the report. Context = WITH the text, so, not PART of the text. Not the problem, but information...
-
How measure of variation (CV or standard deviation) is better to use when comparing Verizon data speeds in Mbps and magnitudes of earthquakes in RM (Richter magnitude)?
-
We want to increase the temperature of the air contained in a closed bottle. The initial temperature and pressure of the air inside the bottle are 300 K and 202,650 Pa absolute, respectively. The...
-
Tel Tec has just announced that their next dividend will be $2.25. In the announcement, management has projected that earnings will grow at 10 percent per year for the following 3 years, then slow to...
-
After sitting on a shelf for a while, a can of soda at a room temperature (67F) is placed inside a refrigerator and slowly cools. The temperature of the refrigerator is 36F. Newton's Law of Cooling...
-
Kenneth Hubbard has prepared the following list of statements about managerial accounting and financial accounting. 1. Financial accounting focuses on providing information to internal users. 2....
-
The Thunderbird Quick Delivery Company needs a truck and is evaluating two alternatives for meeting its needs for the next 10 years. Choice A: Buy a used Ford truck for $6,000. It will be depreciated...
-
The Colgate Distributing Company has the choice of furnishing its sales representatives with a car or paying a mileage allowance for the use of the representatives' own cars. If the company furnishes...
-
Suppose a firm has the following demand equation: Q = 1,000 - 3,000P + 10A Where Q = quantity demanded P= product price (in dollars) A = advertising expenditure (in dollars) Assume for the following...
-
What is the relation between degrees Fahrenheit and degrees Rankine? And the relation between degrees Celsius and Kelvin?
-
State Newton's second law as you would apply it to a control mass.
-
Explain the significance of \(g_{c}\) in Newton's second law. What are the magnitude and units of \(g_{c}\) in the English Engineering system? In the SI system?
Study smarter with the SolutionInn App