Question: Section 1 0 . 2 ( pp . 1 5 9 - 1 6 1 ) provides clues for # you to use to compose

Section 10.2(pp.159-161) provides clues for
# you to use to compose a function called
# drawPhyloTree(Tree), which will take a tree in
# the form of a tuple as input.
# Recall smallTree from Chap. 9--
smallTree =('A',
('B',
('D',(),()),
('E',(),())
),
('C',
('F',(),()),
('G',(),())
)
)
# drawPhyloTree(tree) should write out the names
# of leaf nodes, but should not write out the
# root or internal nodes.
# Your program should recognize the base case of
# when the tree inhand is actually a leaf node.
# If so, it should write the node's name using
# trutle.write(x), where x is a string.
# In the recursive case drawPhyloTree(tree)
# should draw branches.

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 Programming Questions!