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
Describe the difference between fuses and circuit breakers. where might each type of device find its best use? g
ycow [4]
Here i found this link that might help!
https://study.com/academy/lesson/the-differences-between-fuses-circuit-breakers.html

Have a nice day!
3 0
3 years ago
Sort short_names in reverse alphabetic order.
tangare [24]

lst = short_names.split()

print(sorted(lst,reverse = True))

6 0
2 years ago
Research: "How was your experience on site '4chan'?"<br><br> Please answer in the box below.
olganol [36]

Answer:

My experience was comfortable

Explanation:

This website is pretty simple and loads fast, there are a lot of images with high quality but only when you click over of the image this expands in the original size.

I could find really helpful information, there are different subjects, but this is not a website for kids for some adult content.

I didn't need to register any information to share content or if you want to ask something and everything is anonymous.

5 0
3 years ago
Which of the following are screen objects used to maintain, view, and print data from a database
amid [387]

Answer:

The correct answer to the following question will be "A spreadsheet".

Explanation:

  • A spreadsheet is a software device used to access and stores data from such a database. The interaction between separate entities (in separate tables) is controlled by their specific columns.
  • It's a programming program for arranging, evaluating and storing data in tabular format.
  • The spreadsheets have been developed as computer-controlled analogs to paper reporting worksheets. The system runs on data decided to enter in table cells.

Therefore, a Spreadsheet is the right answer.

8 0
3 years ago
Select the correct answer.
9966 [12]

Answer:

B

Explanation:

Every HTML document must begin with a declaration of what the document is going to be about.

4 0
2 years ago
Other questions:
  • The 3rd generation programming language that most students learned when most computers used MS DOS was ___ . It remains a safe p
    12·1 answer
  • How does information technology most benefit people’s personal and professional lives?
    9·2 answers
  • The adjustable contact of a potentiometer is placed at the center of its adjustment. If the total resistance is 5 kOhms, what is
    9·1 answer
  • If your vehicle catches fire while you are driving, you should:
    5·2 answers
  • Which access object(s may be used when creating a lookup field to select valu?
    8·1 answer
  • What frequency band is used by bluetooth, 802.11b, and 802.11g?
    12·1 answer
  • Write a program that receives an character and displays its Unicode. Here is a sample run: Enter an character: E The Unicode for
    8·1 answer
  • Nicotine us a dangerous chemical found in Cigarettes; it is accompanied by two other very harmful chemicals. These are
    15·1 answer
  • Write a program that calculates the average of N integers. The program should prompt the
    12·1 answer
  • explain why it would be preferable to use a DATE data type to store date data insetad of a character data type
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!