Question: Python3please Question 4a: University Majors (1 point) Given a dictionary that tell you a person's major, write a Python function that, given a person's name
Question 4a: University Majors (1 point) Given a dictionary that tell you a person's major, write a Python function that, given a person's name and a major subject, and False otherwise. See the test cases for examples #Your code here In [ ] : Carol. majors-1-1.Josh" check sa jor("Donglas, Art History", ma jorsI) True "Engineering". .Accounting Duglas": "Art History" Irene", "Engineering, "Robert" -Engineering. "qristi WIn : a jors 2 Jack": "Engineering. "Carol": Account ing Douglas: "Art History "Irene: Engineering" "Robert: "Engineering" Christia Question 4b: University Majors Il (1 point) Given a dictonary that instead maps majors to lists of names, repeat the above question. See the test cases for examples ): def check ma jor2 (name, ma jor, ma jor dictionary) # Your code here Engineering: Josh Robert Irene"]. Accounting: ['Carol, "Christine, "Charles1. Art History: Dla ma jor2( Douglas, "Art History", majors 3) True : ma jors 4 ( Engineering": ["Jack "Robert. Irene]. "Accounting": [Carol, "Christine Charles]. "Art History": ['"Douglas check ma jor2 ("Jack", "Accounting", ma jors 4) False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
