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
Nana76 [90]
3 years ago
10

Write a program that reads a list of words. Then, the program outputs those words and their frequencies. Ex: If the input is: he

y hi Mark hi mark the output is: hey 1 hi 2 Mark 1 hi 2 mark 1
Computers and Technology
1 answer:
Tpy6a [65]3 years ago
4 0

Answer:

#Declare variable to get the input

#list from the user

input_list = input()

#split the list into words by space

list = input_list.split()

#Begin for-loop to iterate each word

#to get the word frequency

for word in list:

#get the frequency for each word

frequency=list.count(word)

#print word and frequency

print(word,frequency)

Explanation:

This program that we are told to write will be done by using python programming language/ High-level programming language.

The question wants us to write a program in which the output will be as below;

hey 1

hi 2

Mark 1

hi 2

mark 1

Just by imputing hey hi mark hi mark.

Just copy and run the code below.

#Declare variable to get the input

#list from the user

input_list = input()

#split the list into words by space

list = input_list.split()

#Begin for-loop to iterate each word

#to get the word frequency

for word in list:

#get the frequency for each word

frequency=list.count(word)

#print word and frequency

print(word,frequency)

You might be interested in
Type the correct answer in the box. Spell all words correctly.
lesya [120]

Answer:

The another term for accountability is:

Responsibility.

8 0
3 years ago
Read 2 more answers
Which background-repeat value represents this div?
Marina86 [1]

Answer:

repeat-y ................ ..

6 0
2 years ago
20 POINTS! Which music making software is better? Ableton Live or Logic Pro? Name the advantages and disadvantages of each one!
Mamont248 [21]
Fgfdhvcgnvfujgfghgf vgbcrv
4 0
2 years ago
Read 2 more answers
Name 4 components of a components system​
Veseljchak [2.6K]
The four main components are main memory, arithmetic and logic unit, control unit, and input/output (I/O). :)
4 0
3 years ago
If you had to choose, would you consider yourself more of an internet celebrant or a skeptic? On balance, do you think the inter
vitfil [10]

Answer:

i`m more a celebrant

Explanation:

3 0
3 years ago
Other questions:
  • Safety interlock module operates by monitoring the voltage from the
    7·1 answer
  • Which of the following is a popular open source intrusion detection system that runs on SmoothWall?? Synchronous Dynamic Random
    6·1 answer
  • Suppose that your application uses a loop that isn't producing the intended results. The best way to analyze what’s going on in
    13·1 answer
  • Which of the following best defines Monte Carlo simulation?a. It is a tool for building statistical models that characterize rel
    11·1 answer
  • Thomas drew a rectangle with an area of 6 square cm what is the greatest possible perimeter of this rectangle
    5·1 answer
  • Which command can be used to find errors on a hard drive​
    6·1 answer
  • What property must be set on a menu item to have the user activate that option by pressing Ctrl C on the keyboard
    11·1 answer
  • Identify two real-world examples of problems whose solutions do scale well
    13·1 answer
  • Javed’s teacher tells him she would like to see him improve his speaking skills in the next debate by including a rhetorical app
    9·1 answer
  • Help me with this two questions please
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!