Question: Please further expand the function you implemented in (2) to allow the printing of the number of each unique leaf part in a sub-parts-structure tree

Please further expand the function you implemented in (2) to allow the printing of the number of each unique "leaf part" in a sub-parts-structure tree as the example shown below: (20 points) In this example, given the part 'P1' and its sub-parts-structure tree, there are 293+4393= 378 'P6' parts and 418=32 'P7' parts. Therefore, given input value 'P1', the function should print out the following (you need to create a table with the data above to test your code): P6 378 P7 32
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
