public class TurtleSquare{
public static void main(String [] args){
Picture canvas = new Picture(500,500);
Turtle t = new Turtle(canvas);
t.penDown();
for (int i = 0; i < 4; i++){
t.forward(100);
t.turn(90);
}
canvas.show();
}
}
Version A:
The bigger box is 100 by 100 Pixels. The smaller box is 50 by 50 Pixels
Write Java code that creates the picture shown above.
public class TurtleSquaresA{
public static void main(String[] args) {
// Write your code here
}
}
Version B:
All boxes are 100 by 100 Pixels.
Write Java code that creates the picture shown above.
public class TurtleSquaresB{
public static void main(String[] args) {
// Write your code here
}
}