1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dimaraw [331]
3 years ago
10

1. (4 points) Write a function, called word_frequency, which takes a file name as a formal parameter and find the occurrence fre

quency of each distinct word in the file. Consider to use the following algorithm: A. Prepare a dictionary to keep track of the count of each word. B. Open the file. C. For each line in the file do: C.A Break the line into words using spaces in between. C.B Clean each word: strip leading and trailing whitespaces, digits and punctuation characters and convert uppercase letters to lowercase. C.C Update word occurrence count in the word count dictionary. Each item in the dictionary has a word as key and the count of the word as value. D. Close the file. E. Return the dictionary. These are the symbols and digits to be stripped off from words: punctuation

Computers and Technology
1 answer:
Troyanec [42]3 years ago
8 0

Answer:

Check the explanation

Explanation:

CODE

def total_word_count(words):

total = 0

#Loop through all words

for word in words:

#Find total

total = total + words[word]

return total

Kindly check the attached image below for the code output.

You might be interested in
Problem statement: Using loop, write a program that will ask the user to enter a character for left or right. Then, the user wil
zvonat [6]
Define variables
left is l
right is r

Ask input
left or right

Ask input value

Equate l or r to the input value

Show ladder with steps equal to input value and in the side of input variable
7 0
3 years ago
Why is it important to register your software when you install it
Serjik [45]

the normal reasons program creators deliver to enroll your program – to get tech bolster, news, upgrades, offers, bug fixes, and so on. It too ensures your venture since it gives you changeless get to to your enlisted serial number in case something ever happens to your computer or computer program.

6 0
2 years ago
Universal Containers has the following requirements:• Enable VIP community access once a customer has reached $1 million in reve
Dima020 [189]

Answer:

A. Create a profile that has permissions to the VIP information and assign it to the VIP community users.

Explanation:

Salesforce is a customer rapport management platform that is based on the cloud. There are program applications for sales, marketing and services. The platforms are utilized to achieve an enhanced relationship with customers because they have a better understanding the need of their customers and how to solve their problems by organization and managing their customers' information and interactions.

VIP users will get access to the information they want when there are permissions set for the VIP users. VIP information will be given to the VIP customers in order for them to carry out activities that they need to do to execute their job.

6 0
3 years ago
Which of the following is used to keep track of website content?
Alja [10]

Complete Question:

Which of the following is used to keep track of website content?

Group of answer choices.

A. Antivirus software.

B. File management system.

C. Disk management.

D. Control panel.

Answer:

B. File management system.

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations of a web page to be displayed.

When a website has been created, it is important and necessary to manage and monitor the content or resources contained in the web site so as to improve and enhance its performance. In order to achieve this, a file management software or system such as LogicalDoc, Goo-gle drive, DocuWare, Alfresco, etc.

Hence, a file management system which is typically a cloud-based service can be used to keep track of website content.

6 0
3 years ago
Leslie Is doing a sociological study of people who have live remote island. She interviews the people and than she observes them
dimulka [17.4K]
Making guesses, as opposed to the other answers, this is the only one that forges new ideas and doing such will only lead to an illegitimate conclusion/study.
5 0
3 years ago
Read 2 more answers
Other questions:
  • A. When executing System.out.println(a1), the toString() method in the Object class is invoked.
    14·1 answer
  • . Stress can affect not only your health, but also other aspectsof your
    15·1 answer
  • ICT excel data homework
    10·1 answer
  • Read first a user's given name followed by the user's age from standard input. Then use an ofstream object named outdata to writ
    6·1 answer
  • What is a win-win situation?
    5·1 answer
  • What areas do you need to grow your knowledge in to understand your financial future?
    12·1 answer
  • All slides in a presentation must use the same transition. True or False?
    13·2 answers
  • What would be printed to the screen when the following program is run?
    11·1 answer
  • The main function of a(n) ____________________ is to centralize access control for the network by keeping an eye on both inbound
    9·1 answer
  • _____ allows information to be viewed at a glance without needing to address the individual elements of the information separate
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!