Question: Python 3.6 Question 12 20 points Write a function named wordLengths that takes one string parameter, text You may assume that the given text contains

Python 3.6

Python 3.6 Question 12 20 points Write a function named wordLengths that

Question 12 20 points Write a function named wordLengths that takes one string parameter, text You may assume that the given text contains only letters and white space Input: Return a dictionary in which each key is the length of a word in text and the corresponding value is the number of words of that length For example, the following would be correct output text = 'Go to Heaven for the climate Hell for the company' print(wordLengths(text)) 12: 2, 3: 4, 4: 1, 6: 1, 7: 2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!