Question: using python 3 Write a function called getPopular Words that takes two inputs: a Python dictionary called words and an integer called num. The parameter
Write a function called getPopular Words that takes two inputs: a Python dictionary called words and an integer called num. The parameter words stores the percentage popularity of different types of words. The function should return a list of all items (sorted alphabetically) whose percentage is greater than or equal to num. Assume that the parameters given to you are both of the correct type. For example: get PopularWords({'a': 100, "the" : 180, 'an': 98, 'go': 80), 90) should return ['a', 'an', 'the']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
