Home Work Assignment Number 4
- Read Chapter 5 in Donaldson book (we will read chapter 4 after we
finish 5)
- Write a program:
- Use the turtle library to draw a picture.
- Look at the Manual for Python's turtle graphics to help you
figure out how to use additional portions of Turtle Graphics that we
did not cover in class: http://docs.python.org/py3k/library/turtle.html
- You can also look at the 4 square programs I used in class to
help you: four_squares.py
and four_squares2.py
- Include at least a stick figure in your picture. A google image
search illustrates what a stick figure is, in case you are
unfamiliar with the term (or want some inspiration).
- If you want the figure to have a round head use
my_turtle.circle(NUMBER) where NUMBER is the radius of the circule
(e.g., 50)
- Include
functions that encapsulate code for reuse.
- Examples: draw_left_arm, draw_left_leg, draw_stick_figure
- These functions could make it easier for your code to be
understood, to draw multiple stick figures, etc.
- Criteria for grading:
- Does your code draw at least one stick figure?
- Do you have functions that encapsulate ideas, e.g.,
draw_left_arm, draw_right_arm, etc.?
- Is your code easy to run? For example, it would be good
to either:
- Have a main function that runs your code. You can call this
main function at the end of your .py file.
- Or you could have really good instructions (in comments)
explaining how to run the code.
- Do you do anything interesting or creative?
- Did you find out anything interesting when you looked up the
turtle document that you tried when you ran the code?