In Pythoninput 1 and input 2’s degree is 4 If input 1 and input 2 have same parents, result return 0Else if input 1 and input 2 have same grandparents , result return 1 Else if input 1 and input 2...

In Python input 1 and input 2’s degree is 4 If input 1 and input 2 have same parents, result return 0 Else if input 1 and input 2 have same grandparents , result return 1 Else if input 1 and input 2 have same great_grandparents , result return 2 Else if input 1 and input 2 have same great_great_grandparents , result return 3 Continue until found they have the same great_great_great…._grandparents, For adding one great, result +1 Else: if no relationship between two input, return -1 tree = [[‘Max’, None , None], [‘Luc’, ‘Max’, None], [‘Lue’, ’Max’, None], [‘Joy’, ‘Luc’, ‘Yoyo’], [‘Eva’, ‘Joy’, ‘Zoe’,], [‘Julie’, ‘Geo’, ‘Eva’], [‘input1’, ‘Brand’, ‘Julie’], [‘Jim’, ‘Lue’, ‘Rae’], [‘Gil’, ‘Jim’, ‘Ree’], [‘Rose’, ‘Gil’, ‘Mandy’] [‘input2’, ‘James’, ‘Rose’] this follow by [people, father, mother] Make the function def degree(input1, input 2, tree)
Мах<br>Yoyo<br>Rae<br>Luc<br>Lue<br>Zoe<br>Ree<br>Joy<br>Jim<br>Mandy<br>Ana<br>Geo<br>Eva<br>Gil<br>Boo<br>Julie<br>James<br>Rose<br>Brand<br>Input1<br>Input2<br>

Extracted text: Мах Yoyo Rae Luc Lue Zoe Ree Joy Jim Mandy Ana Geo Eva Gil Boo Julie James Rose Brand Input1 Input2

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here