# hw3 - Biological Computation 20.181 Homework 3 In this...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Biological Computation 20.181 Homework 3 In this assignment, you will get more experience writing functions that act on the tree data structure we outlined in class. Tree arithmetic. In this exercise, you will compute the average distance from the root of a tree to its leaves. In the last homework, you were given the task of printing branch lengths, now you will use those same lengths to do some simple 'tree arithmetic'. First, compute the average distance from root to leaf within a tree. Your function will use a codebase nearly identical to that of the previous homework, and should take the following form: def avgDistance(tree): #This function returns the average root to leaf distance #in a phylogenetic tree # #...insert code here # # return averageDistance Detecting outliers. When genes evolve faster or slower than expected, that may reveal important insight as to how natural selection is acting. Genes that are being repurposed by evolution to function in a new niche, may evolve more rapidly in that niche/species -- this process is sometimes called...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

hw3 - Biological Computation 20.181 Homework 3 In this...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online