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
kykrilka [37]
3 years ago
8

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
Computers and Technology
1 answer:
Gnom [1K]3 years ago
8 0

Answer:

The program in Python is as follows:

wordInput = input()

myList = wordInput.split(" ")

for i in myList:

   print(i,myList.count(i))

Explanation:

This gets input for the word

wordInput = input()

This splits the word into a list using space as the delimiter

myList = wordInput.split(" ")

This iterates through the list

for i in myList:

Print each word and its count

   print(i,myList.count(i))

You might be interested in
How do you become a hacker? Is there any good websites? Where do you begin? Preferably a white hat.
4vir4ik [10]
I suggest learning and studying technology and the way a computer or a phone works and how it receives info. That way, you will be able to give the device something it won't handle...... I think....
3 0
3 years ago
Obtain the Truth tables to the following Boolean expressions, and prove the solution's in sagamath
nlexa [21]
The answer to your question is b☺️☺️
4 0
3 years ago
Write a function called is_even that takes one parameter and returns a boolean value. It should return True if the argument is e
Nikitich [7]

def is_even_number(n):

   return True if n % 2 == 0 else False

while True:

   number = int(input("Enter a number: "))

   if number == 0:

       break

   else:

       if is_even_number(number):

           print("Even")

       else:

           print("Odd")

I wrote my code in python 3.8. I hope this helps.

6 0
3 years ago
What are the values of A[K] and A[K+1] after code correspopnding to the following pseudocode is run?
Black_prince [1.1K]

Answer:

After running the given pseudocode the values will be:

A. A[K] = 20, A[K + 1] = 20

Explanation:

The given pseudocode appears to be applied on an array.

Let us look at the given pseudocode one by one

A[K] = 10;

This line of code assigns value 10 to the position A[K] in array

A[K+1] = 20;

This line of code assigns value 20 to the position A[K+1]

A[K] = A[K+1];

This line will assign the value at A[K+1] to A[K] which means value 20 will be assigned to A[K]

so after this line A[K] = 20

A[K+1 ] = A[K];

This line will assign the value in A[K] to A[K+1] as A[K+1] has the value 20 currently so

A[K+1] = 20

Hence,

After running the given pseudocode the values will be:

A. A[K] = 20, A[K + 1] = 20

5 0
3 years ago
Read 2 more answers
Specification which has little effect on the speed of a processor is
krek1111 [17]

Answer:

Specification which has little effect on the speed of a processor is cache system bus speed clock speed socket type. 

3 0
2 years ago
Other questions:
  • What medium allows for electronic delivery of DTP content without the need for any physical media?
    13·1 answer
  • Write a Java method that will take a string and reverse it. Can you come up with a method that is faster than regular reversing
    7·1 answer
  • Which of these is a poetic device walt whitman often uses to emphasize certain ideas in his poems?a. meterb. alliterationc. rhet
    12·1 answer
  • To illustrate a point in a Word document with a simple chart, what commands should you select?
    8·2 answers
  • Which of the following is NOT true about high-level programming<br> languages?
    9·2 answers
  • Look at the following description of a problem domain:The bank offers the following types of accounts to its customers: saving a
    8·1 answer
  • Write a program that accepts a file name from the command line, then initializes an array with test data using that text file as
    6·1 answer
  • Select the correct answer.
    5·1 answer
  • What is one way a senior employee can mentor a new employee? Give orders about what to do and what not to do Gossip about which
    10·1 answer
  • A. Fill in the blanks:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!