Question
1.Assume a dictionary empDict which maps employees to salaries Print the HIGHEST of the salaries & the AVERAGE of the salaries. Print the name &
1.Assume a dictionary empDict which maps employees to salaries
Print the HIGHEST of the salaries & the AVERAGE of the salaries.
Print the name & salary for employees with salaries above 50000
2.Write a function filterWords that takes a list of words and string It RETURNS the list of words that contain that string. Case should not matter upper and lowercase letters both match.
Example: wdList = [This,IS,a,long,liSt,of,words]; resultList = filterWords( wdList, is ) print(resultList) #prints [This, IS, liSt]
3.Suppose the user has been asked to enter a sentence. Assume words are delimited by a space. Write code to PRINT
the NUMBER of words that contain at least 4 characters. the words that have more than two vowels.
Example: Everything tHereFOrE is an ExaMination of skills
Output:
Number of words with at least four chars: 4
Words with > two vowels: [Everything,tHereFOre, ExaMination]
sentence = input(Enter a sentence: )
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