- A function called
`length`that takes a list as a parameter and returns the length of the list. Your function may not use the`len`function (Hint: to see if a list has a length of 0, check to see if it equals`[]`) - A function called
`rec_max`that takes a list as a parameter and returns the largest value in the list. You may assume that the list has at least one entry in it (and, of course, you may not use the`max`function). You can use the`len`function if you'd like.

- A function called
`rec_count`that takes a list and another object as a parameter. The function returns how many times the object occurs in the list (you may not use the`count`,`in`or`find`functions).

See the prelab for more details.

Once your function works, take a screen shot of your H figure and submit it via the online submission script.

- Walk through the four steps for defining a recursive function we discussed in class. When doing this for graphical components, the key is often trying to finish a statement like: "A recursive H is ...", where somewhere after "is" you should end up using the term "recursive H". For example, a broccoli is a line with three smaller broccolis off of the end of this line. Once you have this, think about what the base case would be.
- It can sometimes help to mentally walk through your recursive steps and draw out the figure by hand.
- As always, think about how you might break off some of the functionality of this function into other functions to make your code easier to debug and read.

To do this, you must implement a function called `stairs` that
takes three parameters: the x and y coordinates of the bottom left
corner of the stairs and the length of the side of the square in the
bottom left hand corner. You should recursively draw stairs as long
as the side length is greater than 3. The squares will be colored
such that they get darker for smaller squares (not grey). Besides
drawing the stairs, the function should also return the number of
squares inside the stairs, which must be calculated recursively (like
we did with counting the lines for broccoli).

Powers of 2 work well for starting lengths. See the prelab for more details on how the stairs can be viewed recursively.

- Walk through the four steps for defining a recursive function outlined in class. Try to finish the following statement recursively "Stairs are ...".
- Get your
`stairs`function working drawing just the outline. - Add functionality to change the color of the squares based on the length of the side of the square.
- Change your
`stairs`function so that it returns the number of squares that make up the stairs. - Write some code so that it generates the stairs when the program runs (I used a starting length of 128).
- Add the text underneath your picture stating the number of
squares. Read the documentation in the turtle module (or use
`help`) regarding the`write`function to help you with this. You*must*use the answer returned by your`stairs`function in your text (that is, don't hard-code 63 in your call to`write`).

- Add some color to the recursive H
- Make the color more interesting for the stairs, for example, have it change based on whether it's the top or the right recursive staircase.
- Add another recursive function that draws a different recursive structure (for example out of circles or triangles). If you do this, upload another screen shot as well.

- You should have a docstring comment for each module at the top of the file
- You should have comments after the module doc string stating your name, course (including section number), assignment number and the date.
- Each function should have an appropriate
*docstring* - Other miscellaneous comments to make things clear

points warmup.py length 3 rec max 3 recursive pictures.py recursive H 5 recursive stairs 4 returns num squares 2 stairs coloring 2 text/generates picture on run 2 Comments, style 5 Prelab 2 Extra points 2 Total 28 + 2