Data structures dict_contains_keys(items:set, example_dict:dict)->bool This function will have two parameters. The first is a set of numbers known as Number Set. The second is a dictionary known as Dictionary. Dictionary will have keys as integers and values as letters. The functions should return true if at least one of the numbers in the Number set is a key in Dictionary. It should return false otherwise. Example: Items: {8, 10, 5}
Example: {9: 'F', 10: 'X'}
Expected: True Items: {8, 9, 5, 1}
Example: {6: 'i', 5: 'Y', 1: 'N', 0: 'E'}
Expected: True Items: {9, 10, 4}
Example: {5: 'i', 3: 'o', 1: 'N'}
Expected: False
Data structures dict_contains_keys(items:set, example_dict:dict)->bool This function will have two parameters. The first is a set of numbers known as Number Set. The second is a dictionary known as Dictionary. Dictionary will have keys as integers and values as letters. The functions should return true if at least one of the numbers in the Number set is a key in Dictionary. It should return false otherwise. Example: Items: {8, 10, 5} Example: {9: 'F', 10: 'X'} Expected: True Items: {8, 9, 5, 1} Example: {6: 'i', 5: 'Y', 1: 'N', 0: 'E'} Expected: True Items: {9, 10, 4} Example: {5: 'i', 3: 'o', 1: 'N'} Expected: False
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 15RQ
Related questions
Question
Data structures
dict_contains_keys(items:set, example_dict:dict)->bool
This function will have two parameters. The first is a set of numbers known as Number Set. The second is a dictionary known as Dictionary. Dictionary will have keys as integers and values as letters. The functions should return true if at least one of the numbers in the Number set is a key in Dictionary. It should return false otherwise.
Example:
Items: {8, 10, 5}
Example: {9: 'F', 10: 'X'}
Expected: True
Items: {8, 9, 5, 1}
Example: {6: 'i', 5: 'Y', 1: 'N', 0: 'E'}
Expected: True
Items: {9, 10, 4}
Example: {5: 'i', 3: 'o', 1: 'N'}
Expected: False
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT