Question: Need to come up with a coding in python. The blue highlighted textbox is a test case to make sure the code runs successfully. Find

Need to come up with a coding in python.

The blue highlighted textbox is a test case to make sure the code runs successfully.

Need to come up with a coding in python. The blue highlighted

Find Me Function Name: find me Parameters: a dictionary of strings mapping to strings ( dict), person1 ( str ), person2 (str) Returns: number of people in between the first and last person ( int ) Description: Given a dictionary and two names, find the number of people in between them. The dictionary maps a person ( key ) to the person ( value ) in front of them in a line. If person2 is the value of the personi key, then they have 0 people in between them. If there is no path between the two people, return None. Hint: A while loop to check if the current person you are on is actually in the dictionary might be helpful. However, this also can be done with a for loop. You pick! Test Cases >>> people = {"Damian": "Jakob", "Rajit": "Jasmine Y.", "Jasmine Y.": "Arvin", "Caitlin": "Cathy", "Jakob": "Caitlin"} >>> person1 = "Damian" >>> person2 = "Cathy" >>> print (find_me (people, personi, person2)) # "Damian" -> "Jakob" -> "Caitlin" -> "Cathy

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!