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
FromTheMoon [43]
3 years ago
7

g Define a function called most_frequent_letter which takes no arguments. This function will return a dictionary which will have

as keys the words in the file words.txt and values the most frequent letter occurring in the word. So for the word ’hello’ the value will be ’l’.
Computers and Technology
1 answer:
skad [1K]3 years ago
3 0

Answer:

def most_frequent_letter():

   file = open("words","r")

   dWords = {}

   for line in file:

       line = line.rstrip()

       words = line.split(" ")

       for word in words:

           counts = {}

           for c in word:

               counts[c] = counts.get(c, 0) + 1

           dWords[word] = max(counts, key=counts.get)

   return dWords

print(most_frequent_letter())

Explanation:

the file used was words in txt format and its contents are as follows:

hello aamir jan khan

parallelogram abdullah

anaconda ali

pycharm notebook

You might be interested in
Melissa and Sue want to distribute a document to be discussed at a meeting starting in about thirty minutes. People will be atte
Anettt [7]
The answer is (c) fax the document to each location


Since fax machines are all connected to the old telephone lines, when used, they place a phone call to the number you have specified. This machine at the destination number on the other end receives and the transmission of documents is done over a telephone call. 

Melissa and Sue will also be in a position to send this fax using a computer if the computer will be connected to the phone line and a presence of a dial-up fax modem.




3 0
3 years ago
How do you answer a question on this app?!? Do you comment on the question? I need a reminder! (I haven't been on this app in a
yKpoI14uk [10]
You just click on a question and then you'll see the word "answer" at the bottom of the questions and click on the word to answer the question

6 0
4 years ago
Tom is trapped on the top floor of a department store. It’s just before Christmas
Artemon [7]

Answer:

tom wants to help her

Explanation:

Tom is rushing because he is at the top of a department store and he can't get a hold of her.  

5 0
3 years ago
Read 2 more answers
Zenmap's topology tab displays a __________ that shows the relative size and connection type of all discovered ip hosts.
VladimirAG [237]
<span>Zenmap's topology tab displays a "Bubble Chart" that shows the relative size and connection type of all discovered IP hosts.
</span>A kind of chart which shows three dimensional data is known as Bubble chart. It also can be seen as the variation of scatter plot where bubbles replace the data points.
4 0
3 years ago
From the set ( 5 , 7 , 9 , 11 , 13 make the inequality w - 4 &lt; 8 true
Ksenya-84 [330]

Answer:

Explanation:

One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.

Fill a rectangular baking glass dish with water.

Place a plastic bag with ice in the water near the left edge of the dish.

Place a lighted lamp near the left edge of the dish so that its light falls directly on the plastic bag.

Put a few drops of ink in the water.

The student did not observe any circulation of ink in the water as expected because the experiment had a flaw. Which of these statements best describes the flaw in the experiment? (2 points)

Not enough ink was added.

Not enough water was taken.

The dish was too small for the experiment.

The lamp and the ice bag were at the same place.

7 0
3 years ago
Other questions:
  • 1. You want to schedule a weekly analysis for the Windows servers in your data center. The command should run as a scheduled job
    15·1 answer
  • Which three phrases describe a wireframe
    12·1 answer
  • A firewall is either software or dedicated hardware that exists between the __________ being protected.
    13·1 answer
  • Which of the following parts of a tool would require the tool to have a guarding device?
    13·2 answers
  • A block level element begins on a new line and some space is usually added before and after it - True or False?
    13·1 answer
  • During which part of geologic time did photosynthesis evolve?
    15·2 answers
  • How is communication within healthcare different than communication within other industries ?
    13·1 answer
  • I'll give brainlyist
    9·2 answers
  • Sketch f(x) = 5x2 - 20 labelling any intercepts.​
    13·1 answer
  • Multiple Choice: Circle the letter that corresponds to the correct answer.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!