Some turtle functions that will be helpful beginfill

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: t;>> square(100) >>> square(200) (0b) Edit function square by adding a second parameter, scolor. The function should now draw an scolor ­colored square. Some turtle functions that will be helpful: begin_fill(), end_fill(), and fillcolor(). When begin_fill() is called, the turtle keeps track of its starting point, and all the lines it has drawn until end_fill() is called. When end_fill is called, the turtle fills in the space enclosed by the lines that the turtle has drawn. The turtle color function and up and down functions may also be useful. Explore the functions using IDLE’s help function or using the Python documentation. Test function square with whatever arguments you like, for example: >>> square(100, “red”) >>> square(25, “cyan”) (0c) Write a function, triangle, with two parameters, length and tcolor, which w...
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