subject

1. Your task is to process a file containing the text of a book available as a file as follows:A function GetGoing(filename) that will take a file name as a parameter. The function will read the contents of the file into a string. Then it prints the number of characters and the number of words in the file. The function also returns the content of the file as a Python list of words in the text file. A function FindMatches(keywordlist, textlist): The parameter keywordlist contains a list of words. The parameter textlist contains text from a book as a list of words. For each word in keywordlist, the function will print the number of times it occurs in textlist. Nothing is returned. If you implemented the functions correctly then the following program:booktext = GetGoing('constitution. txt') FindMatches (['War', 'Peace', 'Power'], booktext) Will read the file "constitution. txt" and print something like the following:The number of characters is: 42761The number of words is: 7078The number of occurrences of War is: 4The number of occurrences of Peace is: 2The number of occurrences of Power is: 11

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
question
Computers and Technology, 22.06.2019 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
You know the right answer?
1. Your task is to process a file containing the text of a book available as a file as follows:A fun...
Questions
question
Mathematics, 03.12.2021 04:30
question
Computers and Technology, 03.12.2021 04:30
Questions on the website: 13722363