Check Career Function Name: checkCareer() Parameters: students ( list ), career (str) Returns: selectedStudents (list) D

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Check Career Function Name: checkCareer() Parameters: students ( list ), career (str) Returns: selectedStudents (list) D

Post by answerhappygod »

Check Career Function Name Checkcareer Parameters Students List Career Str Returns Selectedstudents List D 1
Check Career Function Name Checkcareer Parameters Students List Career Str Returns Selectedstudents List D 1 (92.4 KiB) Viewed 31 times
Check Career Function Name: checkCareer() Parameters: students ( list ), career (str) Returns: selectedStudents (list) Description: McGonagall wants to see which of her fifth years want to do a certain job. Write a function that takes in a possible career path and a list of sublists. Each sublist will contain the stu- dent's name, and their desired career. The function should return a list of all the students that have the same desired career as the inputted career path. The list should contain the names in alpha- betical order. Hint: The.sort() method and sorted() function may be helpful in this question. >>> students = [["Harry", "Auror"], ["Ron", "Auror"], ["Seamus", "Curse Breaker"]] >>> checkCareer(students, 'Auror') ['Harry', 'Ron'] >>> students = [["Ginny", "Quidditch Player"], "Luna", "Professor"], ["Padma", "Professor"]] >>> checkCareer(students, 'Quidditch Player') ['Ginny']
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply