CSci 150: Foundations of computer science I
Home Syllabus Assignments Tests

printable version

Quiz 1

[1] [2] [3] [4]

Problem Q1.1.

[8 pts] Sketch the final appearance of the window when the computer completes the program fragment below.

Turtle mystery = new Turtle(10050);
int toDraw = 4;
while(toDraw > 0) {
    mystery.forward(25);
    mystery.right(60 - 60 * toDraw * (toDraw % 2));
    toDraw = toDraw - 1;
}
mystery.hide();