Question: Function name: study_group Parameters: list of students and their major (list of strings), your major (string) Returns; list of students with the same major (list

 Function name: study_group Parameters: list of students and their major (list

Function name: study_group Parameters: list of students and their major (list of strings), your major (string) Returns; list of students with the same major (list of strings) Description: Write a function that takes a list and a string, where the list represents other students, and the string represents your major. Return a list of the names of students that have same maj students will be in the format Full Name, Major", and your major will be in the format "Major. If no other student has the same major as you, return an empty list. Ignore capitalization of majors such that for example, "Computer Science" and "computer science" are considered the same major. There will always be one comma in each string. or as you so that you can form a study group with them. Every string in the list of Hint: The split() and strip) functions might be helpful for this function Cory Brooks & Tiffany Xu >student list-[Charlie Brown, Computer Science". "Penny Proud, Mechanical Engineering Chun Li, Economics", Tony Stark, computer science" major "Computer Science >>test 1 study group(student list, major) >>> print(test1) ['Charlie Brown", "Tony Stark] student list2 ['Stuart Little, Finance", "Ninki Minjaj, Philosophy", "Emery Bingham, Theology1 >>>major2 = "Math" >>> test 2 # study-group(student-list2, major2) >>> print(test_2)

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!