Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Python3please image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions