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, 21.06.2019 23:30
Step 1: choose your topics review the project milestone reflections you submitted for modules 1 through 4. choose the one major idea or concept from each module that you feel most applies to your life. in addition, choose an important concept from module 5 that applies to your life. step 2: write your guidebook for each module: write a catchy headline that clearly and concisely sums up your chosen idea or concept write a brief explanation that includes a description of the concept, why it is important, and how it can be applied to your life to make a positive impact choose an exciting, powerful, or engaging image that illustrates your concept remember, you are writing one for each module, so you will have a total of five headlines, five descriptions, and five images. step 3: design your guidebook choose a format to present your digital guidebook. there are many 21st century tools available for creating and submitting your work in the online environment. for more information on tools your school uses, contact your instructor or visit the web 2.0 tools area.
Answers: 3
question
Computers and Technology, 24.06.2019 08:00
Arah has entered data about football players from team a and team b in a worksheet. she enters names of players from team a with details about each player in different columns of the worksheet. similarly, she enters details of all the players from team b. which option will her view the data for team a and team b in two separate sections after printing? a. page break view b. freeze pane view c. split screen view d. full screen view e. zoom out view
Answers: 1
question
Computers and Technology, 24.06.2019 10:10
Scanning the road can be thought of as a
Answers: 2
question
Computers and Technology, 24.06.2019 17:00
Following are uses of spreadsheets. for each use, choose whether the use is a business use, consumer use, or student use. family budget: sales data: recording research data for science class:
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
English, 03.07.2019 15:30
question
Mathematics, 03.07.2019 15:30