Create 3.7.max_depth.py

# The web crawler we built at the end of Unit 3 has some serious
# flaws if we were going to use it in a real crawler. One
# problem is if we start with a good seed page, it might
# run for an extremely long time (even forever, since the
# number of URLS on the web is not actually finite). The final two
# questions of the homework ask you to explore two different ways
# to limit the pages that it can crawl.

#######

# THREE GOLD STARS#

# Modify the crawl_web procedure to take a second parameter,
# max_depth, that limits the minimum number of consecutive
# links that would need to be followed from the seed page to reach this
# page. For example, if max_depth is 0, the only page that should
# be crawled is the seed page. If max_depth is 1, the pages
# that should be crawled are the seed page and every page that links
# to it directly. If max_depth is 2, the crawl should also include all pages
# that are linked to by these pages.
#
# Note that the pages in the crawl may be in any order.
#
# The following definition of get_page provides an interface
# to the website found at http://www.udacity.com/cs101x/index.html

# The function output order does not affect grading.