Question
Please provide the Python code and the resulting output. Question - Given a dict that maps a class number to a major identifiers where you
Please provide the Python code and the resulting output.
Question - Given a dict that maps a class number to a major identifiers where you could find that class number, return the set of numbers that one could take for a specific major!
- For an extra challenge, try doing this in one line (Optional).
Args: adict (dict) major (str) Returns: set
>>> classes_dict = {4232: ["ISYE", "MATH", "HTS"], 2316: ["CS", "CX", "MGT"], 3000: ["ISYE", "MGT", "ECE"], 2027: ["ISYE", "PSYC", "HTS"]}
>>> classes(classes_dict, "ISYE") {4232, 2027, 3000}
>>> classes(classes_dict, "CS") {2316}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started