Homework 5
The deadline is on Thursday, the 8th of December, 23:59 (the final deadline is Friday, the 9th of December, 23:59 Estonian time).
Exercise 1. Fractal
The following image contains examples of a fractal (orders 1, 2, 3, 4 and 5). Write a recursive function which takes the order number and the length of the tree (a tree is the fractal of order 1) as the arguments, and draws the fractal of the corresponding order. Demonstrate the work of your function drawing the fractal of order 5.
Exercise 2. Sum of the first n numbers
Write a recursive function that returns the sum of the first n integers. For example, the sum of the first 6 numbers is 6+5+4+3+2+1=21.
Go to Moodle and upload your solution into Homework 5.