PYTHON PROGRAM 2) DictOperations.py Define a dictionary called “agencies” that s
ID: 3817105 • Letter: P
Question
PYTHON PROGRAM
2) DictOperations.py
Define a dictionary called “agencies” that stores a mapping of
• acronyms CCC, FCC, FDIC, SSB, WPA, (as keys) and
• federal government agencies ‘Civilian Conservation Corps’, ‘Federal Communications Commission’, ‘Federal Deposit Insurance Corporation’, ‘Social Security Board’, and ‘Works Progress Administration’ (as values)
Then:
a) Add the map of acronym SEC to ‘Securities and Exchange Commission’
b) Change the value of the key SSB to ‘Social Security Administration’
c) Remove the (key, value) pairs with keys CCC and WPA
Explanation / Answer
agencies = {'CCC': 'Civilian Conservation Corps', 'FCC': 'Federal Communications Commission' , 'FDIC': 'Federal Deposit Insurance Corporation', 'SSB': 'Social Security Board’', 'WPA' : 'Works Progress Administration'};
agencies['SEC']= 'Securities and Exchange Commission';
agencies['SSB'] = 'Social Security Administration';
del agencies['CCC'];
del agencies['WPA'];
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.