Author: Colin Price

Turtle Graphics
With the WeeBee Engine
Teacher’s Book

Easter 2022

Quick Start
Open up the folder on the memory stick and double left-click on RUN_ME.bat. See inset on the right.
You will get two windows; on the left is where you will type code, and on the right is the canvas where the turtle will do its drawing. The first task from Book 1 will be loaded.

Now hit the run button and the canvas will be prepared. Now it will look like this;

Drag the bottom of the left window down, using the left mouse button. This will make it easier for children to add many lines of code.

Let’s start coding. Ask the children to follow this sequence:
a) Left click underneath the last line of code.
b) Press the TAB key.
c) Add a line of code. Start with add(turtle1,30,20);
d) Press the ENTER key.

e) Now press the run button to see the effects of the line of code.
Make sure the children always follow this sequence. Their code will be nicely laid out so it is very readable for yourself as well as the children.

Toolbar Buttons
There are 5 toolbar buttons. From left to right these are (i) load a code file, (ii) save your current code file, (iii) run your current code, (iv) pause the running code (v) stop and exit (close down).

If you use the pause button, press it once to pause, and press it again to continue. Pressing pause then run (without the second pause press) may cause problems.
When you press on the load button (upwards-pointing yellow arrow) the following dialogue box will open

Select the file you wish to load (using the left mouse button), then press on the ‘Open’ button, bottom right. The code will then appear in the left window.

Engine Configuration
There are two ways you can change how the engine works. If you wish to change the font size, then open the file Header.txt on the pen drive (with a text editor) and look for the line of text // Fonts selected here. In the line underneath, you can change the font used, and its size.
To change she animation speed, open the file Config.txt and change the line animationTime 1.0 This is the time each command takes to complete, currently set to 1 second.
Take care editing these files. Any error could break the engine.

Syntax
Here’s a typical line of code:
turtle1.moveForward(10);
The first word turtle1 tells you that the turtle1 is selected to do something. You could choose turtle2 which looks slightly different, but behaves the same. Then comes a dot . which tells the turtle that it will receive a command. Finally comes the command itself, here that is moveForward(10); which makes the turtle move 10 units in the direction it is currently facing. So if you were talking to the turtle, you might say,
“Hey, turtle1, move forward ten units!”
This syntax is used in professional Java (the WeeBee engine was itself coded in Java). It uses a programming approach called ‘Object Oriented Programming’ (OOP). Here the turtle is the ‘object’ and the functions called after the dot are called the turtle’s ‘method’.
Most lines of code will look like the above. The exception is when you add something to the canvas, as above when we added the turtle.
add(turtle1,30,20);
Note that each line of code, which is a command, ends with a semicolon ; This is common to many professional languages (e.g., Java, C, C++);
Naming Convention
Many commands are made of words joined together, such as moveForward. Note how the second word is written with a capital F, so we don’t write moveforward. another example is the command to set the pen down. This must be written like this, turtle1.setPenDown(); and not setpendown(); This is called ‘Camel case’ since the word look as though they have humps like camels.
Lines of code starting with // are ignored by the engine. These are useful for adding comments into the code. You can see this at the top of all code tasks, where the name of the task is given.

Functions and Arguments
Functions are small chunks of code which achieve one single purpose. For example the function add will add something to the canvas, and the function moveForward makes the turtle move forward; each has a single purpose.
Functions always have an opening round bracket ( and a matching closing round bracket ). In between these brackets, are some words and numbers which give the function some details about what to do. The technical term for these are the arguments of the function. Let’s look at the add function example here:
add(turtle1,30,10);
The first argument is turtle1 which tells us that we want a turtle to be added. The second argument 30 is the x-coordinate of where we want the turtle to appear and the third argument 10 tells us the y-coordinate of where we want the turtle to appear.
Let’s take another more complicated example. You will learn later that there is a nice function to draw a rectangle. Here’s how you would use it:
turtle1.drawRectangle(30,20,50,10);
The first argument 30 is the x-coordinate of the rectangle (bottom left point) and the second argument 20 is the y-coordinate. The third argument 50 is the width of the rectangle and the fourth argument 10 is its height.
When a function is documented in guides for the user (e.g., the ‘API’ list on the next page), then the function arguments are presented as names so you can easily understand what each argument means. The above example would be written,
drawRectangle(X,Y,width,height);
The children must replace the names with actual numbers.

Possible confusion.
Sometimes when children are presented with the above line, and asked to fill in numbers for the parameters, they will still type “X, Y, width, height”. This will not work!

The Application Programming Interface (API)
The term ‘API’ refers to the functions available for a particular software application. Here we summarize the WeeBee engine Turtle Graphics API. The first column shows the function definition, the second an example, and the third a statement of what the example does.

setPenDown();	setPenDown();	Sets pen down so any movement commands will draw on the canvas.
setPenUp();	setPenUp();	Sets pen up so movement commands will not draw on the canvas.
setPenColour(colour);	setPenColour(red):	Changes the pen colour.
setPenWidth(width);	setPenWidth(4);	Changes the pen width.
moveForward(length);	moveForward(30);	Move forward 30 units. Will draw a line if the pen is set down.
rotate(degrees);	rotate(90);	Rotates on the spot. Positive angles are clockwise.
moveForwardTo(X,Y);	moveForwardTo(30,40);	Move forward to a point (X,Y). Will draw only if the pen is set down.
drawSquare(X,Y,length);	drawSquare(20,10,30);	Draws a square at a point (X,Y) with sides of length. Will always draw.
drawTriangle(X,Y,length);	drawTriangle(20,10,15);	Draws a triangle at a point (X,Y) with sides of length. Will always draw.
drawHexagon(X,Y,length);	drawHexagon(5,5,20);	Draws a hexagon at a point (X,Y) with sides of length. Will always draw.

Possible confusion.
Sometimes when children are presented with the above line, and asked to fill in numbers for the parameters, they will still type “X, Y, width, height”. This will not work!

Errors children may make
Children will make errors in coding, just as they do in Literacy and Maths. Here are some common errors children make. We have found these in our research with over 500 Primary children. Actually, our research has shown that children make few errors, and not more than my own undergraduate students!
Most errors result from carelessness, or children being so enthusiastic that they write too quickly.
Here’s a list of errors we have found in the past, in order of frequency of occurrence:

1. Spelling errors and typos. Children will mis-spell a word such as writing tutle instead of turtle.
2. Forgetting to type a semi-colon ; at the end of the line.
3. Writing code in the wrong place. All code must be written between the curly backets { and } within the block of code provided.
public void once() {
all code must go here
}
4. Sometimes children write code after the closing bracket } and sometimes they manage to delete this bracket. I have no idea why! Keep an eye out for this!
5. Forgetting to use Camel-case, writing setpendown instead of setPenDown.
6. Inventing a function not in the API such as drawCircle(20);
7. Forgetting to include an argument to a function, such as add(turtle1); instead of add(turtle1,20,10);
Typing a dot . instead of a comma , which is easily done since they look very similar and they are next to each other on the keyboard.

Links to the National Curriculum
The development of Turtle Graphics had an eye on the following:

Year 1	Recognise and name common 2-D and 3-D shapes, including: / 2-D shapes [for example, rectangles (including squares), circles and triangles].
	Describe position, direction and movement, including whole, half, quarter and three-quarter turns.
Year 2	Identify and describe the properties of 2-D shapes, including the number of sides and line symmetry in a vertical line. / Identify and describe the properties of 3-D shapes, including the number of edges, vertices and faces identify 2-D shapes on the surface of 3-D shapes, [for example, a circle on a cylinder and a triangle on a pyramid]. / compare and sort common 2-D and 3-D shapes and everyday objects.
	Order and arrange combinations of mathematical objects in patterns and sequences. / Use mathematical vocabulary to describe position, direction and movement, including movement in a straight line and distinguishing between rotation as a turn and in terms of right angles for quarter, half and three-quarter turns (clockwise and anticlockwise).
	Pupils should work with patterns of shapes, including those in different orientations.
Year 3	Recognise angles as a property of shape or a description of a turn.
	Pupils’ knowledge of the properties of shapes is extended at this stage to symmetrical and non-symmetrical polygons and polyhedra.
	They should be able to describe the properties of 2-D and 3-D shapes using accurate language, including lengths of lines and acute and obtuse for angles greater or lesser than a right angle.
Year 4	Compare and classify geometric shapes, including quadrilaterals and triangles, based on their properties and sizes. / Identify acute and obtuse angles and compare and order angles up to two right angles by size. / Identify lines of symmetry in 2-D shapes presented in different orientations. / Complete a simple symmetric figure with respect to a specific line of symmetry.
	Describe positions on a 2-D grid as coordinates in the first quadrant / describe movements between positions as translations of a given unit to the left/right and up/down plot specified points and draw sides to complete a given polygon.

Additional Assets
Here are some additional assets which children can add to their scenes. These will be useful for Book 3. Actors can be added, but only one of each name. They can move around. Items of scenery can be added but they can’t move. You can add any number of each item. This is a small selection of assets built into the engine.
Actors

Pip Grog Jig Mop Flup Zon

Saff Drax Wemz

Suri Jek Klos Mif Riz Vash

Scenery

Angelica Puffy shrimp seaweed bee tree ant

egg star storm saucer log fire barrel

Book 1 Learning Objectives
Here’s what the children should learn from each activity:
Drawing a Line
(i) Adding a turtle, (ii) setting its pen down, (iii) drawing a short line. Children should see that the turtle draws a line which emerges behind it as it moves forward.
Using the Pen
(i) Setting the pen up. Children should see that the turtle only draws a line when its pen is down. When its pen is up, it moves a distance without drawing. Children should realize that this is useful to get the turtle to a point without leaving a line behind it. This will be used often in later activities.
Drawing with Colours
(i) To select the pen colour. Here it is important that the lines of code are in the correct order. They must start by putting the pen down.
turtle1.setPenDown();
turtle1.setPenColour(blue);
(ii) To select the pen width. Note again that this must come after the pen is set down. Also the width can be set only once, it is not possible to use different widths within one drawing.
Turning Corners
(i) To make the turtle rotate a certain angle on the spot. Note that turning left (anti-clockwise) uses negative angles. The rotate function is very useful in creating shapes and complex objects.
This activity has an ‘Investigate and Experiment’ task. Children should experiment with moveForward and rotate to create shapes, and they should master these functions.
Steps and a Staircase
Nothing new is introduced here, instead children are invited to apply their knowledge and understanding of the moveForward and rotate functions.
Squares
Here, again, there is nothing new. Children must think out how to draw a square, then change the arguments of the moveForward function to draw a rectangle instead of a square. They will also add Pip, from WeeBee Story-Writing-Coding (SWC) onto the canvas. This will suggest to them that they can use characters, scenery and props from SWC in their turtle work. This will be useful in Book 3.
Squares—the easy way
Children will learn (i) the drawSquare function.
Children will have written several lines of code to draw a square. If you asked them to draw two squares, then they should be able to say that they would repeat the code they have already written, but with different arguments to moveForward.
While this is correct, it is not the most efficient and friendly way to code. When one is tempted to repeat code, then it is time to place all those lines of code into a function. So instead of repeating code, you call the function several times.
Here they are introduced to the function drawSquare which takes the following arguments,
turtle1.drawSquare(X,Y,length);
where X, Y are the coordinates of the square (bottom left vertex) and length is the length of all sides. This function will automatically call setPenUp when the turtle moves to the starting point, and then call setPenDown to do the drawing.
Some thoughtful children may realize this is happening, and ask about it. If not, you may choose to have a discussion with the class, and point out that this is happening.
“Turtle—Go Home!”
(i) The function moveForwardTo(X,Y) is introduced. This makes the turtle turn towards the point (X,Y) and then move there. If the pen is down, it will draw a line, else it will not, (ii) to apply the setPenUp and setPenDown functions.
The task involves getting the turtle to return to its starting point. This will usually be the point specified when the turtle is added, e.g., add(turtle1,20,10); so (20,10) is the turtle’s home.
But this function is useful in getting the turtle to move to any point (X,Y), and is usually preceded by a call to setPenUp.
Drawing a Flag
Nothing new is introduced here. Instead the children apply what they have learned so far, but in an interesting way.
Navigating Roads
Again nothing new is introduced, but children have to think about details of coordinates to get the turtle to follow the roads.
It is expected that most children will use two lines to solve the challenge; first moving all the way to the right, followed by moving up to Pip.
To make things more interesting, a second challenge is proposed where children take “the longest path you can think of ”. This is an interesting challenge in thinking since it is possible to loop around the roads before reaching Pip. Will children use loops? Will they repeat loops? If so, how do they decide when to exit the loop and head off to Pip? Such thinking might be developed in future coding activities (Book 4, TBA).
Challenging Roads
This could work in one of two ways: Either (i) you could set a challenge for the whole class, (ii) children coding-pairs could set challenges for other pairs.
Before coding commences, children should think about the design of their challenge. This might start by looking at which scenery, actors and props to add onto the canvas, then looking at how the turtle could interact with these.
I would advise not to get the turtle to ‘pick up’ various things; this would introduce complexity of coding which would detract from the main aims of Turtle Graphics.
Alternatively, if you wish to move on, this activity could be skipped, especially as Book 3 contains plenty of more creative challenges.

Book 2 Polygons Learning Objectives
Here’s an opportunity to link Turtle Graphics to the National Curriculum Maths Specification if you want to. Our original intention in developing Turtle Graphics was to let the children have some fun in coding, and to encourage dialogue, especially within coding-pairs. One of our research questions is whether Turtle Graphics could help learning maths, especially geometry, and we look forward to your reflections on the children’s progress when the activities are complete.
Drawing a Triangle
(i) To draw a triangle. Here the children are guided to draw a triangle using moveForward and rotate(-120) When the triangle is complete, there is opportunity for the teacher to discuss angles and regular polygons.
Thinking about Drawing a Triangle
This could be used as a basis for a teacher-led discussion on angles and regular polygons, using the approach employed by teachers in their maths lessons.
Triangle—A Better Way
(i) To learn to use a variable. So far the arguments given to functions have been numbers, e.g. the number 120 in the function turtle1.rotate(-120) used to draw a triangle. In computing, such numbers are called ‘magic’ numbers and must be used with care.
The use of variables is more powerful. To see this, compare two ways of coding a triangle, shown below. On the left, if you wanted to change the rotate angle (say to draw a different polygon) then you would need to change –120 three times. Using a variable, on the right, you only need to change one line, angle =

turtle1.moveForward(20);
turtle1.rotate(-120);
turtle1.moveForward(20);
turtle1.rotate(-120);
turtle1.moveForward(20);
turtle1.rotate(-120);

angle = 120;
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);

A Pentagon and a Hexagon
(i) More work with variables. Here the children will apply the idea of using variables explored in the previous activity to draw a pentagon, then a hexagon.
A regular pentagon has 5 sides of equal length and rotation angles 360/5 degrees. Similarly a hexagon will have rotation angles 360/6 degrees.
This activity will reinforce the nature of regular polygons and link to the maths curriculum.
Using Functions
(i) Revisiting the drawSquare function, (ii) Working with the drawTriangle and drawHexagon functions.
This should be straightforward. Children may need some guidance on writing numbers as function arguments; some children may type in drawTriangle(X,Y,length); which will not work, they should be writing something like drawTriangle(5,5,10);
The functions setPenUp and setPenDown are not needed, since these are built into the draw functions (but they are still needed to draw lines);
There is opportunity here for children to think about the design of the arrangement of their three triangles, and three hexagons before they start coding. Other children may code their shapes, and then change the function arguments to make the arrangements more appealing.
Drawing Many Shapes
(i) The drawRectangle function is introduced. Note that its arguments are X, Y and then width and height.
This activity also presents “A note about functions” which you could use to lead a class discussion on functions and arguments.
Drawing a House
Nothing new is introduced here. This is intended as a fun activity to round off this book.

Book 3 Learning Objectives
A series of challenges is presented. They are of varying complexity. Children should be invited to choose one challenge to start with, and if time allows to attack others.
When building a scene, children will want to see the grid. This is shown by the first
Line of code
showGrid(true);
When they are finished, then they can turn the grid off by changing the above to
showGrid(false);
Here is a list of challenges with an indication of level of effort needed on a scale 1 = little effort, 2 = effort suitable for all, 3 = substantial effort.
Pip at a dangerous place 1
Pyramids in the desert 1
Rocket 1
CityScape 2
Bee Hive 3
The Podium 2
Flags 2
Pip in a Cage 3
Fishtank 3
Stack of Crates 2

Book 1 Solutions
Here are complete listings of solutions to the activities.

aTurtle1
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.moveForward(30);
}

aTurtle3
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.setPenColour(blue);
turtle1.setPenWidth(5);
turtle1.moveForward(20);
}

aTurtle2
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.moveForward(20);
turtle1.setPenUp();
turtle1.moveForward(20);
turtle1.setPenDown();
turtle1.moveForward(20);
}

aTurtle4
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.setPenWidth(3);
turtle1.rotate(-90);
turtle1.moveForward(20);
turtle1.rotate(90);
turtle1.moveForward(20);
}

aTurtle5
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.setPenWidth(3);
turtle1.moveForward(20);
turtle1.rotate(-90);
turtle1.moveForward(20);
turtle1.rotate(90);
turtle1.moveForward(20);
turtle1.rotate(-90);
turtle1.moveForward(20);
turtle1.rotate(90);
turtle1.moveForward(20);
}

aTurtle6
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,20,20);
turtle1.setPenDown();
turtle1.setPenColour(green);
turtle1.setPenWidth(4);
turtle1.moveForward(30);
turtle1.rotate(-90);
turtle1.moveForward(20);
turtle1.rotate(-90);
turtle1.moveForward(30);
turtle1.rotate(-90);
turtle1.moveForward(20);
turtle1.rotate(-90);
}

aTurtle7
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,20,10);
turtle1.setPenDown();
turtle1.setPenWidth(4);
turtle1.setPenColour(red);
turtle1.drawSquare(30,20,15);
turtle1.setPenColour(green);
turtle1.drawSquare(25,15,30);
turtle1.setPenColour(blue);
turtle1.drawSquare(20,10,40);
}

aTurtle8
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,20,20);
turtle1.setPenDown();
turtle1.setPenWidth(2);
turtle1.setPenColour(red);
turtle1.drawSquare(70,20,10);
// Go home —————————
turtle1.setPenUp();
turtle1.moveForwardTo(20,20);
// Move somewhere then draw
// line
turtle1.moveForwardTo(20,40);
turtle1.setPenDown();
turtle1.moveForward(20);
turtle1.setPenUp();
turtle1.moveForwardTo(20,20);
}

aTurtle9
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenUp();
turtle1.moveForwardTo(40,10);
turtle1.setPenDown();
turtle1.setPenWidth(4);
turtle1.setPenColour(red);
// Draw the pole ----------------------
turtle1.rotate(-90);
turtle1.moveForward(40);
// Draw the flag -----------------------
turtle1.drawSquare(40,30,20);
// Add Pip ------------------------------
add(pip,50,35);
// Go home! ---------------------------
turtle1.setPenUp();
turtle1.moveForwardTo(10,10);
}

aTurtle10
public void once() {
showGrid(true);
setScene("Troad1");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.setPenColour(black);
turtle1.setPenWidth(5);
add(pip,80,45);
turtle1.moveForward(70);
turtle1.rotate(-90);
turtle1.moveForward(30);
}

aTurtle11
public void once() {
showGrid();
setScene("Troad2");
add(turtle1,10,10);
turtle1.setPenDown();
// Children's code comes below here
}

Book 2 Solutions
Here are complete listings of solutions to the activities.

aTurtle12
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,30,10);
turtle1.setPenDown();
turtle1.setPenWidth(3);
turtle1.setPenColour(red);
turtle1.moveForward(20);
turtle1.rotate(-120);
turtle1.moveForward(20);
turtle1.rotate(-120);
turtle1.moveForward(20);
turtle1.setPenUp();
turtle1.moveForwardTo(10,10);
}

aTurtle13
public void once() {
float angle;
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,30,10);
turtle1.setPenDown();
turtle1.setPenWidth(3);
turtle1.setPenColour(red);
angle = 360/3;
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);
}

aTurtle14
public void once() {
float angle;
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,30,10);
turtle1.setPenDown();
turtle1.setPenWidth(3);
turtle1.setPenColour(red);
// Children correct the line below to
// divide by 5 for the pentagon
// angle = 360/10;
angle = 360/6;
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);
turtle1.moveForward(20);
turtle1.rotate(-angle);
}

aTurtle15
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,30,10);
turtle1.setPenDown();
turtle1.setPenWidth(3);
turtle1.setPenColour(red);
turtle1.drawTriangle(40,20,10);
turtle1.drawTriangle(55,20,10);
turtle1.drawTriangle(70,20,10);
turtle1.drawHexagon(10,35,10);
turtle1.drawHexagon(35,35,10);
turtle1.drawHexagon(60,35,10);
}

aTurtle15
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,20,10);
turtle1.setPenDown();
turtle1.setPenWidth(4);
turtle1.setPenColour(red);
turtle1.drawSquare(20,10,30);
turtle1.setPenColour(blue);
turtle1.drawTriangle(60,10,20);
turtle1.setPenColour(green);
turtle1.drawRectangle(20,5,40,3);
}

aTurtle16
public void once() {
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,20,10);
turtle1.setPenDown();
turtle1.setPenWidth(4);
turtle1.setPenColour(red);
turtle1.drawSquare(20,10,30);
turtle1.setPenColour(blue);
turtle1.drawTriangle(60,10,20);
turtle1.setPenColour(green);
turtle1.drawRectangle(20,5,40,3);
}

aTurtle17
public void once() {
float angle;
float length;
showGrid(true);
setScene("TurtleBackground2");
add(turtle1,20,10);
turtle1.setPenDown();
turtle1.setPenWidth(3);
turtle1.setPenColour(red);
turtle1.drawSquare(20,10,20);
turtle1.drawTriangle(20,30,20);
turtle1.drawSquare(22,12,6);
turtle1.drawSquare(32,12,6);
turtle1.drawSquare(22,22,6);
turtle1.drawSquare(32,22,6);
turtle1.setPenUp();
turtle1.moveForwardTo(10,10);
add(pip,55,10);
}

Book 3 Solutions
Here are complete listings of solutions to the activities.

aChall1
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.setPenWidth(3);
turtle1.setPenColour(green);
turtle1.moveForward(70);
turtle1.setPenColour(red);
turtle1.drawRectangle(30,10,20,5);
turtle1.drawRectangle(40,15,20,5);
turtle1.drawRectangle(50,20,20,5);
turtle1.drawRectangle(60,25,20,5);
turtle1.setPenUp();
turtle1.moveForwardTo(20,10);
add(pip,75,30);
}

aChall2
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.setPenColour(blue);
turtle1.setPenWidth(4);
turtle1.moveForward(70);
turtle1.setPenColour(red);
turtle1.drawTriangle(20,10,30);
turtle1.drawTriangle(32,21,30);
turtle1.drawTriangle(42,15,20);
turtle1.drawTriangle(70,20,10);
turtle1.drawTriangle(65,22,5);
turtle1.setPenUp();
turtle1.moveForwardTo(10,10);
}

aChall3
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown(true);
turtle1.setPenColour(red);
turtle1.setPenWidth(2);
turtle1.drawRectangle(30,10,10,30);
turtle1.drawTriangle(30,40,10);
turtle1.setPenUp();
turtle1.moveForwardTo(20,10);
turtle1.setPenDown();
turtle1.moveForwardTo(30,25);
turtle1.moveForwardTo(30,10);
turtle1.moveForwardTo(20,10);
turtle1.setPenUp();
turtle1.moveForwardTo(50,10);
turtle1.setPenDown();
turtle1.moveForwardTo(40,25);
turtle1.moveForwardTo(40,10);
turtle1.moveForwardTo(50,10);
turtle1.setPenUp();
turtle1.moveForwardTo(10,10);
}

aChall4
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenDown();
turtle1.setPenColour(red);
turtle1.setPenWidth(2);
turtle1.moveForwardTo(60,10);
drawRectangle(18,10,7,20);
add(tree,30,8);
drawRectangle(35,10,10,8);
add(tree,50,8);
add(tree,55,8);
drawRectangle(60,10,6,25);
drawRectangle(70,10,6,6);
drawRectangle(10,10,5,6);
turtle1.setPenUp();
turtle1.moveForwardTo(0,0);
}

aChall5
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenColour(red);
turtle1.setPenWidth(2);
turtle1.drawHexagon(20,20,15);
turtle1.drawHexagon(44,33,15);
turtle1.drawHexagon(44,6,15);
add(bee,30,30);
add(bee,52,17);
add(bee,52,42);
turtle1.setPenUp();
turtle1.moveForwardTo(5,5);
}

aChall6
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenWidth(3);
turtle1.setPenColour(blue);
turtle1.drawRectangle(20,10,10,10);
turtle1.drawRectangle(32,10,10,15);
turtle1.drawRectangle(44,10,10,6);
add(pip,24,20);
add(mop,36,25);
add(zon,50,16);
turtle1.setPenUp();
turtle1.moveForwardTo(5,5);
}

aChall7
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,30);
turtle1.setPenDown();
turtle1.setPenColour(Color.white);
turtle1.drawRectangle(65,15,10,30);
turtle1.setPenUp();
turtle1.moveForwardTo(10,30);
turtle1.setPenDown();
turtle1.setPenWidth(100);
turtle1.moveForward(40);
turtle1.setPenUp();
turtle1.moveForwardTo(10,15);
turtle1.setPenDown();
turtle1.setPenWidth(100);
turtle1.setPenColour(blue);
turtle1.moveForward(40);
turtle1.setPenUp();
turtle1.moveForwardTo(10,45);
turtle1.setPenDown();
turtle1.setPenColour(green);
turtle1.moveForward(40);
}

aChall8
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,10);
turtle1.setPenWidth(3);
turtle1.setPenColour(blue);
turtle1.drawRectangle(20,10,10,10);
turtle1.drawRectangle(32,10,10,15);
turtle1.drawRectangle(44,10,10,6);
add(pip,24,20);
add(mop,36,25);
add(zon,50,16);
turtle1.setPenUp();
turtle1.moveForwardTo(5,5);
}

aChall9
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,10,5);
turtle1.setPenUp();
turtle1.moveForwardTo(20,10);
turtle1.setPenDown();
turtle1.setPenWidth(10);
turtle1.setPenColour(Color.gray);
turtle1.moveForward(50);
turtle1.rotate(-90);
turtle1.moveForward(30);
turtle1.setPenColour(Color.lightGray);
turtle1.rotate(-90);
turtle1.moveForward(50);
turtle1.setPenColour(Color.gray);
turtle1.rotate(-90);
turtle1.moveForward(30);
turtle1.setPenUp();
turtle1.moveForwardTo(5,5);
add("Angelica",30,25);
add("shrimp",35,10);
add("shrimp",40,22);
add("Seaweed2",45,11);
add("Seaweed2",50,10);
add("Seaweed2",28,11);
add(shell,62,10);
add("Puffy",60,22);
}

aChall10
public void once() {
showGrid(false);
setScene("TurtleBackground2");
add(turtle1,20,10);
turtle1.setPenDown();
turtle1.setPenWidth(5);
turtle1.setPenColour(Color.gray);
turtle1.drawRectangle(20,10,15,8);
turtle1.drawRectangle(40,10,10,8);
turtle1.drawRectangle(55,10,18,8);
turtle1.drawRectangle(30,18,15,8);
turtle1.drawRectangle(48,18,15,18);
turtle1.drawRectangle(35,26,8,10);
turtle1.setPenUp();
turtle1.moveForwardTo(10,10);
}

#

#