Home / Expert Answers / Computer Science / computer-science-nbsp-problem-1-write-a-string-method-call-that-lower-cases-all-of-the-char-pa659

(Solved): computer science  \# PROBLEM 1. Write a string method call that lower cases all \# of the char ...




\# PROBLEM 1. Write a string method call that
lower cases all
\# of the characters in text. One line of code.
Hint: assign th
\# PROBLEM 7. Call litCricfriend() four times to find the frequency
\# of the indefinite articles  \( a \)  and  an and t

computer science 
\# PROBLEM 1. Write a string method call that lower cases all \# of the characters in text. One line of code. Hint: assign the \# lower-cased text to a new variable name. \# PROBLEM 2. Write a string method call that replaces every \# m-dash ('--') in the lower-cased text with a space \( \left(\begin{array}{ll} & \end{array}\right) \).). \# One line of code. \# PROBLEM 3. Write a string method call that splits text into a \# list of words (after they have been lowercased, and the \# m-dashes removed). One line of code. \# PROBLEM 4. Write a loop that creates a new word list, using a \# string method to strip the words from the list created in problem 3 \# of all leading and trailing punctuation. Hint: the string library, \# which is imported above, contains a constant named punctuation. \# Three lines of code. \# PROBLEM 5. Write a loop that sums the number of times that the \# words in wordList occur in the list from Problem 4. Hint 1: you \# can use a list method to do the counting. Hint 2: lower case the \# words in wordList. Between three and five lines of code. (It \# depends on your coding style - various styles are OK.) \# PROBLEM 6. Calculate the ratio of the number from Problem 5 \# to the number of words in text. Return this ratio. Between one \# and three lines of code. (It depends on your coding style -- \# various styles are OK.) \# PROBLEM 7. Call litCricfriend() four times to find the frequency \# of the indefinite articles ' \( a \) ' and ' an' and the definite article \# 'the' in the two poems above. Print out the value returned by \# each function call, identifying what it is. For example, it might say \( \#>> \) bellsaAnFrequency \( 0.07265587064676617 \). \# (That is a made-up number.) Each function call takes one line. \# PROBLEM 8. Do the results show that Poe and Neruda use ' \( a \) ' and 'an' \# differently? Do the results show that Poe and Neruda use 'the' \# differently? Put your answer to PROBLEM 8 here.


We have an Answer from Expert

View Expert Answer

Expert Answer


First
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe