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
Tara is creating a presentation for her science project about volcanoes. She added different animations to every slide for empha
Charra [1.4K]

Answer:

yea

Explanation:

unless that's the only thing that's nice and everything is boring and uninteresting, or there's a tech error that makes the audience bored

5 0
3 years ago
When you're working with a word processing document and you press the DEL Key what happens
wariber [46]
<span>The character to the right of the cursor is deleted. </span>
4 0
3 years ago
Read 2 more answers
Which nmap switch is used to detect target OS and services?<br> a -S<br> b -p<br> c -F<br> d -A
antiseptic1488 [7]

Answer:

d -A

Explanation:

The -S switch is used to use a fake source address, and it can mask your ip.

The -p switch is used to indicate which ports you want to scan, because then it searches for all open ports it searches for that one specifically

The -F switch is used as the quick scan mode, scanning the surface

The -A switch is used to check the operating system.

3 0
3 years ago
Which of the following conditions will maximize the amount of interest you earn
choli [55]
The answer is the amount of money you put in it, brainliest please.
4 0
3 years ago
Assume that a variable variable, number Of Sides has been initialized. Write a statement that assigns the value True to the vari
inna [77]

Answer:

public class ANot {

   public static void main(String[] args) {

   

       int numberOfSides = 20;

       boolean isQuadrilateral;

       if(numberOfSides==4){

           isQuadrilateral = true;

           System.out.println("The triangle is quadrilateral");

       }

       else{

           isQuadrilateral=false;

           System.out.println("The triangle is not quadrilateral");

       }          

}

}

Explanation:

  1. Create and Initilize the int  variable numberOfSides (You can also receive this from a user using the scanner class for example).
  2. create a boolean variable isQuadrilateral
  3. Use if and else statement to check if numberOfSides ==4 and assign true to isQuadrilateral else assign false
7 0
3 years ago
Other questions:
  • What effects will the different types of lighting produce on mountains?
    15·1 answer
  • The keyboard, mouse, trackpad, microphone, light pen, and voice recognition are examples of _____ devices.
    5·1 answer
  • A DESKTOP COMPUTER (NAMED WORKSTATION22) CAN'T CONNECT TO THE NETWORK. A NETWORK CARD WAS PURCHASED WITHOUT DOCUMENTATION OR DRI
    14·1 answer
  • The ____ developed numerical methods for generating square roots, multiplication tables, and trigonometric tables used by early
    12·1 answer
  • Which of these components is a part of the Central Processing Unit (CPU) of a computer?
    11·2 answers
  • What steps should a user take to create a secondary address book?
    8·2 answers
  • Cash cows are always in
    7·1 answer
  • Hey guys im just curious.... whats ur favorite number
    6·2 answers
  • How does calculate() work?
    6·2 answers
  • Stroke weight - ____ of the line around a shape or size of the point
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!