Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started