The SearchData class contains Sitegrams for various URLs. You need to write the rankedPages() method. It will return a list of all pages containing the search term. The pages with the largest number of counts will appear first; the rest will appear in descending order.
>>> sd = SearchData()
>>> sd.addSite('http://ozark.hendrix.edu/~ferrer/')
>>> sd.addSite('http://ozark.hendrix.edu/~ferrer/courses/150')
>>> sd.rankedPages('hendrix')
[(8, 'http://ozark.hendrix.edu/~ferrer/'), (4, 'http://ozark.hendrix.edu/~ferrer/courses/150')]
>>> sd.rankedPages('projects')
[(1, 'http://ozark.hendrix.edu/~ferrer/courses/150')]
>>> sd.rankedPages('Virginia')
[(1, 'http://ozark.hendrix.edu/~ferrer/')]