Question: how to correct the code in In [224] Appreciate it!!! Given a dictionary that instead maps majors to lists of names, repeat the above question.

how to correct the code in In [224]how to correct the code in In [224] Appreciate it!!! Given a Appreciate it!!!

Given a dictionary that instead maps majors to lists of names, repeat the above question. In [224]: def major_2 (major, name): tor n in name: m-maior 2.get(n) def check major (name, major, major 2): if majors 2 n m: return True else: return False In [225]: majors_2 - ["Engineering": ["Josh", "Robert", "Irene" ], "Accounting": "Carol", "Christine", "Charles" ], "Art History": "Douglas " ] check major2( "Douglas", "Art History", majors 2) == True Traceback (most recent call las NameError t) in () 1 majors-2 {"Engineering": ["Josh", "Robert", "Irene "], "Accounti ng": ["Carol", "Christine","Charles"], "Art History": [ " Douglas" ]) >2 check major2 ("Douglas","Art History", majors 2) True ipython-input-144-752f6b414378> in check major2 (name, major, major_2) list (n) 4 5 def check maior2 (name, maior, maior 2): x = if major 2 [m]X return True 8 else: NameError: name 'm' is not defined

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!