Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Are these written ground rules?

Answered: 1 week ago

Question

How do members envision the ideal team?

Answered: 1 week ago

Question

Has the team been empowered to prioritize the issues?

Answered: 1 week ago