0d write a function house that draws a square house

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ill draw a tcolor ­colored triangle when called. Triangle will not return any value. >>> triangle(100, “orange”) >>> triangle(150, “purple”) (As in square, the turtle will need to rotate 360 degrees to complete the triangle and return to its initial heading. In square, the turtle made four turns; for a triangle it will be three.) (0d) Write a function, house, that draws a square house with a door and a roof. The house body, door, and roof should be drawn by calling functions you have already defined. The house function definition will not have any parameters and will not return a value. Some more turtle functions that may be helpful here are goto() and up() and down(). up() and down() lift the turtle “pen” from the canvas and put it back down, respectively. goto will move the turtle directly to the x,y position specified by its arguments. (That is, the goto...
View Full Document

This note was uploaded on 02/12/2014 for the course CIS 122 taught by Professor Staff during the Spring '08 term at Oregon.

Ask a homework question - tutors are online