Question: using python: Collections: Lists, Tuples, Dictionaries, List Comprehension 1)Dictionaries : Suppose a dictionary has been defined that maps ids to a list of items as

using python:

Collections: Lists, Tuples, Dictionaries, List Comprehension

1)Dictionaries: Suppose a dictionary has been defined that maps ids to a list of items as shown: { id: [phone, [lastName, firstName]] } Ex: myDict={ A1:[701-234-1122, [Brown, Bill] ], B2:[218-477-2339,[Jones,Jennifer] }

Check to see if Smith is in the dictionary and print their firstName, lastName, and phone

Print the first and last names of everyone whose phone# begins with area code 218

Delete the entry with key B2 from the dictionary

2)Write Python code that allows the user to continue entering numbers until they type DONE. Print the average of the numbers, the count of even numbers, and the count of odd numbers entered by the user. Example: if the user enters 1, 10, 15, 20, 25, and finally DONE, the output should be Average: 14.2 Count of evens: 2 Count of odds: 3

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!