Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 586 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 586 Bytes

Recursive Functions: Branching Tree

Use the recursive_tree.py as a starting point for this exercise.

The program draws a tree with a given number of branches. The branches are drawn recursively, i.e. the function branch calls itself. Read the code and try to understand how it works.

Modify the code to create some variation in the tree. For example, you could:

  • Add spheres at the end of the branches
  • Variate the length of the branches
  • Variate the width of the branches
  • Variate the color of the branches
  • Variate the number of branches
  • Randomly stop drawing branches