In this unit you’ll learn about functions while using a fun graphics library called ‘turtle’.
1. Using the turtle library, make a drawing. Use at a minimum the following functions.
fd(n)
rt(n)
lt(n)
color(c)
width(n)
goto(x, y)
Each of these functions takes one or more parameters. Make a drawing of a thing, not just an abstract drawing. A house or a car would be appropriate. This will show that you understand the turtle functions. This is TurtleDrawing
2. Use loops and the turtle drawing functions to make a design. Use pen and fill colors. To make something great, consider using a loop inside a loop, and consider using numbered colors to make a color gradient. (gradually changing color). Use your imagination along with your programming skills! This is called TurtleDesign.
3. Make some functions of your own! First do the warmup exercise SquareFunction. Then, make your own cool thing with a function in the project called CreativeFunction. It can be something like a drawing or something like a design – or something only you can imagine.
MORE:
The turtle library lets you write interactive programs. See if you can write a game that uses keyboard and/or mouse input. I wrote a program I call “tictacturtle” that lets you play tic tac toe, with the turtle drawing the board.
Resources: The Python turtle library