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
What commands does SuperKarel know that regular Karel does not?
luda_lava [24]

Answer:

turnRight and turnaround

Explanation:

The regular karel does not know these commands

5 0
2 years ago
Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolut
STALIN [3.7K]

Solution :

x = float_(input())

y = float_(input())

z = float_(input())

res1 = x**z

res2 = x**(y**z)

res3 = abs(x-y)

res4 = (x**z)**0.5

print('{:.2f} {:.2f} {:.2f} {:.2f}'.format(res1,res2,res3,res4))

Output is :

5.0

1.5

3.2

172.47 361.66 3.50 13.13

6 0
2 years ago
When a project is saved, the new file name appears on the ____ tab?
BartSMP [9]
It appears on Document window tab
7 0
3 years ago
You have been given the following String which represents a series of 6 side die rolls:rolls = "1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,
Anni [7]

Answer:

see explaination

Explanation:

rolls="1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,2"

list1 = list(rolls.split(","))

print("The total # of rolls: {}".format(len(list1)))

j=0

for i in list1:

j+=int(i)

print("Total value of all rolls: {}".format(j))

print("Average roll: {}".format(j/len(list1)))

Please kindly check attachment for program code and output

8 0
3 years ago
Explain why it is important that software products are developed and delivered quickly. Why is it sometimes sensible to deliver
Mkey [24]

Answer:

The reason why software products are developed and delivered quickly is because  

  • most of the time client cannot wait an extended time for the merchandise to be developed and delivered because the delay in delivery of software products might cause a loss for the client if that specific software is being developed for the client's business solution.  
  • In some mission-critical applications like defense systems, space research systems in such cases software must be delivered as quickly as possible because the project which is getting into such area cannot await an extended time for a software package to be delivered as here time constraint is involved and delay in at some point might cause a loss for an entire ongoing project.

Explanation:

Sometimes sensible to deliver an unfinished product then issue new versions of that product after delivery because

  • Sometimes the software that has got to be developed could be very big which isn't possible to develop during a shorter time and even client cannot wait an extended time for he's software in such case only the primary main core functionality of the software is being developed and delivered to the client and in later version remaining functionality's are included and delivered.

  • Even it is often the case that software that has got to be developed is very complex and should get lots of obstacles during development in such cases also only the core functionalities are being developed and delivered and in later version remaining functionality's are included.

3) Presence of bugs in software may also lead to issue a new version of that software after delivery and then fix the bug and deliver the new version to the client.

5 0
3 years ago
Other questions:
  • C2.5 - A group of four pirates has a treasure chest and one unique lock and key for each pirate. Using hardware that is probably
    6·1 answer
  • With network management software, a network manager can ____.
    6·1 answer
  • Write an if else statement that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. O
    5·1 answer
  • What two programming systems uses numbers and text?
    6·1 answer
  • Some of the users in your company create and delete so many files that they have problems with fragmented disks. Which of the fo
    5·1 answer
  • How do i find the greatest common factor of two numbers?
    14·1 answer
  • Yall tryna play gta later? I play on ps4
    12·2 answers
  • write a function that takes two integer arrays as input return true if any two of the numbers in the first array input add up to
    10·1 answer
  • Michael needs to ensure that those items that are automatically archived are still easily accessible within Outlook. Which optio
    5·2 answers
  • Which important aspect of the Roman Empire did the barbarians destroy?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!