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
Inessa [10]
3 years ago
13

Write a program that reads a list of words. Then, the program outputs those words and their frequencies.

Computers and Technology
1 answer:
LiRa [457]3 years ago
4 0

Answer:

The program in Python is as follows:

mylist = []

nword= "y"

while(nword== "y"):

    word = input(": ")

    mylist.append(word)

    nword = input("New word: y/n: ")

for item in mylist:

    freq = mylist.count(item)  

    print(item, freq)

Explanation:

This creates an empty list

mylist = []

This is used to let the user input more word or stop input

nword = "y"

The following iteration lets the program read words from the user

while(nword == "y"):

This gets the user input

    word = input(": ")

This appends the inputted word into the list

    mylist.append(word)

This prompts if the user wants to input more word or not

    nword = input("New word: y/n: ")

This iterates through the list

for item in mylist:

This gets the frequency of each word in the list

    freq = mylist.count(item)  

This prints the word and the frequency

    print(item, freq)

You might be interested in
Harold wants to create a design that would depict the innocent and evil sides of human nature. Which colors can Harold use to de
belka [17]

Answer:

Usually good and evil are depicted as black and white or red and white. White being good, or pure.

Explanation:

8 0
3 years ago
Which of these is an output device? keyboard mouse trackpad printer
Firdavs [7]
I think a printer could be wrong
6 0
3 years ago
Read 2 more answers
You can use a(n) ____ to visually separate related controls from other controls on the form.
maksim [4K]

Answer:

The correct answer to the following question will be Group Box.

Explanation:

Group Box:

  • A type container that contains many types of controls that are usually related to each other in the form.
  • It usually provides the identified grouping for other controls.
  • used for the subdivision of the forms.
  • Separation of the controls can be done with the help of grouping by group box.

5 0
3 years ago
_________ cloud offers the services to a limited and well defined number of parties
denpristay [2]

Answer:

Private

Explanation:

5 0
3 years ago
I need help please!!?
tensa zangetsu [6.8K]

Answer: C. Shaking hands after a game/contest

Have a nice day!

5 0
3 years ago
Read 2 more answers
Other questions:
  • A digital footprint is all of the information on-line about a person posted by that person or others, ____________. intentionall
    14·1 answer
  • I'm looking for a new laptop for school. Which laptop would be the best. Right now I have a chromebook and it is broken. 
    12·2 answers
  • PLEASE HELP QUICK WILL GIVE BRAINLY
    6·1 answer
  • When you write Click a picture in a word processing program which actions can you choose to perform on the image
    6·1 answer
  • A(n) ____ is a grouping of related objects within a domain,
    15·1 answer
  • Rain forests clean the air by producing oxygen. Some rain forest plants have healing properties, and can be used as medicine. Ra
    12·1 answer
  • When entering information for a new contact in the address book, Outlook will automatically create a _____. A. Invitation B. Res
    7·1 answer
  • Impacto que ha tenido en la sociedad la educacion virtual​
    11·1 answer
  • What does an arrow after a command indicate
    13·2 answers
  • the first thing to do when your computer gives you an error message is A restart the computer B press the F2 key C write down th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!