PolymathREU-Walking-to-infi.../python/template.py

24 lines
512 B
Python
Raw Normal View History

2020-07-17 22:36:57 -07:00
import math
# these are the tree and utility libraries I created
from tree import Tree
import util
2020-07-17 22:36:57 -07:00
# TODO: tweak this to do whatever you want as I described in the Overleaf
def next(x):
return []
# here we create a tree with value 0 and no children and check it for 20
# iterations, but feel free to change that up
def main():
tree = Tree(0, [])
for i in range(20):
print(tree.longest_path())
tree.step(next)
2020-07-17 22:36:57 -07:00
print(tree.longest_path())
if __name__ == '__main__':
main()