Turtle House
Logo is a computer programming language designed to teach programming to children. It is a user-friendly, interpreted language, designed with a "low floor, high ceiling"; in other words, the designers of Logo intended for the language to allow novice programmers to get started quickly writing programs but also wanted the language to be powerful and extensive for more advanced users. In the last 40 years, Logo has also caused people to think differently about how to teach geometry, social science, and complex systems.
The basic commands to move and turn a "turtle" (originally a physical robot) are so much a part of programming history that they have been incorporated into almost every modern programming language, Python included. We will use this basic system to explore programming. Examples of using the turtle are given in the course textbook and you can use any of the active Code boxes in the text book to complete this part if you do not yet have Eclipse installed.
Specification
Define a function to use the turtle to draw a rectangle, given numbers for its length and width. For example, the following calls to your function draws the two rectangles shown below:
rectangle(yurtle, 100, 50) rectangle(yurtle, 60, 150)
Using your rectangle
function and any other functions written during class or that you want to write to help you, create a Python program to draw a house with the turtle. A basic example is shown below, but feel free to embellish yours as much as you want.
If you want an extra challenge, write more functions so that you can easily make a house with multiple floors or a neighborhood of similar looking houses. Additionally, you can use other functions in Python's Turtle Graphics module to give your drawing color and other effects.
Note
If you have already Eclipse installed and want to use that for this exercise, you will need to add the following line as the last one in your program:
# assuming you are using the name of the Screen from the book wn.exitonclick()