Instructions for turtleScene2

(produced at 00:07 a.m. UTC on 2024-03-25)

This task is part of project08 which is due at 23:00 EDT on 2024-04-02.

You have the option to work with a partner on this task if you wish. Working with a partner requires more work to coordinate schedules, but if you work together and make sure that you are both understanding the code you write, you will make progress faster and learn more.

You can download the starter code for this task using this link.

You can submit this task using this link.

Put all of your work for this task into the file scene2.py
(you will create this file from scratch)

For this task, we want you to review concepts covered in the first part of the class, like loops, functions, and conditionals, giving you space to design your own code that uses these constructs. Back at the start of the class you did either a custom scene or a custom song a way of learning about Python basics; now you will have a chance to make something more complex, using what you've learned so far. This task focuses on turtle and turtlBeads drawing, while you could instead do the wavesynthTune2 task which focuses on audio.

The requirements are again simple, with no restrictions on what you draw: the only rules are that you must make use of certain Python statements.

To start, you need to create a new file, named scene2.py. This file must be in a folder where turtleBeads.py is also present. Download the starter code, unzip it, and then create your scene2.py file in that folder.

Your scene2.py file must satisfy the following criteria:

  1. Your file must start with the usual docstring with authorship information. Here's a template you can copy and paste:

    """
    Authors: Anon & Ymous
    Consulted: T. A.
    Date: 2023-10-31
    Purpose: Turtle Scene task version 2
    """
    
  2. Your file will have to import the turtle and turtleBeads modules.

  3. Your file must include a nested loop, which can be any combination of for and/or while loops as long as they're directly inside each other. Inside the inner loop of this nested loop, you must call a custom function called drawOne.
  4. Your drawOne function must accept at least two parameters.
  5. Your drawOne function must contain at least one if/else statement.
  6. Your drawOne function must call at least one of the following functions:
    • forward (a.k.a. fd)
    • backward (a.k.a. bk or back)
    • drawDot
    • drawCircle
    • drawEllipse
    • drawSquare
    • drawRectangle
    • drawPolygon
    • drawText
  7. You must vary the thickness and colors of some lines, using both pensize and either pencolor or color (pen functions reference).
  8. You must use begin_fill and end_fill to draw at least one filled-in shape, and you must use fillcolor (or color)) to control its color (fill reference; see also the example on filling).
  9. You must use penup and pendown to move the turtle without drawing a line (or you may use the one or more of the teleport, leap, or hop functions from turtleBeads to achieve the same thing).
  10. You must use the title function to assign a title to your graphics window (title reference).

You are welcome to use other turtle or turtleBeads features in addition to the ones listed above, but only the above features are required.

Note: to speed up the drawing when things get complex, you can use the noTrace and showPicture functions. You can read how they work in our turtle documentation.

After completing this task, you must take a screenshot of your graphics scene, name it correctly, and upload it to the shared google drive folder as explained in the submission instructions.

Examples

Rubric

Group goals:
 
unknown No errors loading code
Your code should be able to be loaded without errors. Run your code before submitting it to make sure this is true.
 
unknown Use any kind of loop
Use any kind of loop in at least one place.
 
unknown Use any kind of loop
Within the loop, use any kind of loop in at least one place.
 
unknown Call drawOne
Within the loop within the loop, call drawOne in at least one place.
 
unknown Define drawOne(_, _, ___)
Use def to define drawOne(_, _, ___)
 
unknown Use a conditional
Within the definition of drawOne(_, _, ___), use an if statement (possibly accompanied by an elif or else block) in at least one place.
 
unknown Call forward
Within the definition of drawOne(_, _, ___), call forward, fd, turtle.forward, turtle.fd, backward, bk, back, turtle.backward, turtle.bk, turtle.back, drawDot, turtleBeads.drawDot, drawCircle, turtleBeads.drawCircle, drawEllipse, turtleBeads.drawEllipse, drawSquare, turtleBeads.drawSquare, drawRectangle, turtleBeads.drawRectangle, drawPolygon, turtleBeads.drawPolygon, drawText, or turtleBeads.drawText in at least one place.
 
unknown Call pensize
Call pensize or penSize in at least one place.
 
unknown Call pencolor
Call pencolor, color, or penColor in at least one place.
 
unknown Call fillcolor
Call fillcolor, color, or fillColor in at least one place.
 
unknown Call begin_fill
Call begin_fill or beginFill in at least one place.
 
unknown Call end_fill
Call end_fill or endFill in at least one place.
 
unknown Call penup
Call penup, pu, penUp, teleport, leap, or hop in at least one place.
 
unknown Call pendown
Call pendown, pd, penDown, teleport, leap, or hop in at least one place.
 
unknown Call title
Call title in at least one place.