Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


The key concepts for this project were as follows: 1) parameter and 2) user-controlled scenes.  Parameter was essential to drawing a scene within a scene as I needed to control of scale of each scene.  Through parameter, I was able to color the shapes and fill them with color.  Another key concept, user-controlled features allow users to control some aspects of my shapes or scenes by using the sys package.  I needed to incorporate this into my shape; what I ended up doing was allow users to choose the number of stars in my scenes.

Better Shapes:

In order to fill my shapes with color, I used the if statement as the snippet shows.

What the statement is doing is that if I give value True as a parameter for my shape, then my shape will be filled with color I specified.

If I give value False, then the shape will not be filled be color.  In order to color my shapes, I simply used turtle.color() command.

My better shapes with fill and color parameter look like this:.

Better Scenes:

Nested Scenes:

User-controlled scenes:


  • No labels