Question: Language is Python 3.6 Function name: help_ recruit Parameters: A string Return value: A tuple of length 3 Descriotion: Write a function that takes in

 Language is Python 3.6 Function name: help_ recruit Parameters: A string

Return value: A tuple of length 3 Descriotion: Write a function that

Language is Python 3.6

Function name: help_ recruit Parameters: A string Return value: A tuple of length 3 Descriotion: Write a function that takes in a string that holds the information of a recruit. You may assume that the string will always be formatted in this way: NAME: SPORT, RANK" Return a tuple in the format (SPORT (string), RANK (int), NAME (string)). Please note there is a space before SPORT. The tuple that is returned must not have any spaces within the strings. Test Cases >>test1 help recruit( Joseph Macrina: Football, 1") >>>print (test1) Football', 1, Joseph Macrina) >>test2 help recruit("Chris Eubanks: Tennis, 8") >>>print (test2) (Tennis, 8, "Chris Eubanks') >>test3 help recruit("Ashley Askin: Volleyball, 6") >>>print (test3) (Volleyball', 6 'Ashley Askin) Eunction name: recruiting_profile Parameters: A list of strings, sport_name Return value: A list of tuples Descriotion: Write a function that takes in a list of strings. The list can be empty, in which case return an empty list. Each string contains information about a person. You may assume that the string will always be formatted in this way: "NAME: SPORT, RANK. Call the help_recruit function to convert each string to a tuple. Find all the tuples that have sport_name and add them to a list sorted by their rank. However, the tuples in this list should be formatted as(RANK(int), SPORT(string) NAME (string)). No one will have the same rank. Return the list. Notes If you have a function that returns a tuple of length three another way you can call the function and store the returned values is: . o a, b, c myfunc() . When sorting the tuples, you may use a built-in function >>recruits- recruiting_profile(["Jair Anderson: Football,4", "TaQuon Marshall: Football, 1", "Daniel Yun: Tennis, 3", "Gabby Benda: Volleybal1, 7", "Ashley Askin: Volleyball, 2", "Sydney Wilson: Volleyball, 5", "Chris Eubanks Tennis, 1" "Zach Matthews: Football, 11 "Andrew Li: Tennis, 2" "Tennis") >print (recruits)

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!