2025 Python For Loops & Functions

Your goal in this assignment is to write a program that uses functions and a for loop to create repeating shapes using Python Turtle.

This assignment description includes:
-sample output
-sample starter code
-link to Python color chart
-a diagram of the x,y coordinates used in Python Turtle

Your program should include the following elements:

  1. at least two different functions;  each function should draw ONE shape that is NOT a square.  Could be a rectangle, triangle, hexagon, etc.  But not a basic, four sided square. 
  2. a for loop that calls one of your function to create repeating versions of your shape that don’t overlap. Create at least four shapes that are different from each other.  Scroll down for sample final output.
  3. fill each shape with a different color. HINT: put your fillcolor and begin_fill/end_fill commands above and below the line that calls your function.
  4. give each shape a different outline (stroke color) by using the pencolor() command.
  5. use the penup and pendown commands and the goto (x,y) commands so that the shapes are not stacked on top of each other. Make sure that there are no lines between shapes.

Click here for the Python Color Chart

Resources: