INQ241A
Mobile Apps

Activity 4

Accumulator

  1. Create a new script that uses a Turtle and a for loop with variables to draw a square spiral. The spiral should look something like this:

    square_spiral
    Note that the turn angle is always the same, but the distance the turtle travels increases. You will need a variable for the distance the turtle travels that increases every iteration of the loop.

  2. Create a new script that uses a Turtle and a for loop with variables to draw a curved spiral. The spiral should look something like this:

    circle_spiral
    Just like a drawing a circle, the turtle is moving forward and turning a small amount each iteration of a loop. However, if the turtle turns the same amount and moves forward the same amount it will create a circle. So to make the spiral something must change by a small amount each iteration of the loop.

  3. Create a new script that uses a Turtle and for loops with variables to draw a nautilus with a sequence of squares. Each square should be a larger than the previous and at a different angle than the previous square. All of the squares should have one corner at the same location. The nautilus should look something like this:

    square_nautilus_20_5_15

Submission

Please show your source code and run your scripts for the instructor or lab assistant.