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, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
You have read about the beginnings of the internet and how it was created. what was the internet originally created to do? (select all that apply) share research. play games. communicate. share documents. sell toys
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 3
You know the right answer?
Modify the function below to match the following description:
#
# This function takes...
Questions
Questions on the website: 13722363