subject

Modify the function below to match the following description:
#
# This function takes in a dictionary dct. You can assume that the keys and
# values of the dictionary are limited to strings and numbers.
#
# If any key or value contains either MAX_DIGIT or the first letter of your
# last name (in either upper or lower case) then the key-value pair is removed
# and the modified dictionary is returned. Here containment means that the
# symbol is present anywhere -- e. g. 'doodle' contains letter 'd' and
# 195 contains 5
#
# Here are some examples assuming the first letter of my last name is d and
# MAX_DIGIT=5:
#
# fix_dictionary({'a':1, 3:'x', 'x':'y'})
# will return {'a':1, 3:'x', 'x':'y'} (no change)
#
# fix_dictionary({'d':1, 3:'x', 'x':'y'})
# will return {3:'x', 'x':'y'} (first key-value pair is removed)
#
# fix_dictionary({'DX':1, 3:'x', 'x':'y'})
# will return {3:'x', 'x':'y'} (first key-value pair is removed)
#
# fix_dictionary({'h':15, 3:'x', 'x':'y'})
# will return {3:'x', 'x':'y'} (first key-value pair is removed)
#
# fix_dictionary({'h':95, 3:'d', 'z':'paddle'})
# will return {} (all key-value pairs have been removed)
#

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:20
Sometimes writers elaborate on the truth when recalling past events so they can enhance their narrative essay with more interesting descriptions. do you feel that published writers should or should not embellish real life events just to make their stories more interesting?
Answers: 2
question
Computers and Technology, 22.06.2019 10:50
A911 dispatcher is the sole sender of messages to all police officers. while on patrol, officers communicate with the dispatcher who, in turn, relays messages to other officers. the officers do not communicate directly with one another. this illustrates a network.
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Write the pseudo code for this problem based on what you learned from the video. the purpose is to design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to miles. the conversion formula is as follows: miles = kilometers x 0.6214
Answers: 3
question
Computers and Technology, 24.06.2019 11:00
Each row in a database is a set of unique information called a(n) ? a.) table. b.) record. c.) object. d.) field.
Answers: 2
You know the right answer?
Modify the function below to match the following description:
#
# This function takes...
Questions
question
Mathematics, 16.12.2021 19:30
question
Mathematics, 16.12.2021 19:30
question
Chemistry, 16.12.2021 19:30
Questions on the website: 13722362