0% found this document useful (0 votes)
15 views5 pages

Handout

This document provides information about commands for controlling a turtle object and properties for configuring a graphics window in a programming language. It lists 9 commands for moving, turning, hiding the turtle and controlling the pen and speed. It also lists 6 properties for setting the title, size, and colors of the graphics window. Examples are provided for using some of the commands and properties.

Uploaded by

Laila Hammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Handout

This document provides information about commands for controlling a turtle object and properties for configuring a graphics window in a programming language. It lists 9 commands for moving, turning, hiding the turtle and controlling the pen and speed. It also lists 6 properties for setting the title, size, and colors of the graphics window. Examples are provided for using some of the commands and properties.

Uploaded by

Laila Hammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

International department

Student Name: Second Semester (2021, 2022)


Date:

Grade 4th ( H , W , Z ) Computer Booklet (Handout)

1
This is a handout to help you study this programming language 

The Turtle (object):

Commands:

1) Turtle.Show()
- An action.
- Makes the turtle appear.
- If not written before “other commands” it will not be considered wrong.

2) Turtle.Move(Distance)
- An action.
- Moves the turtle a specified distance.

3) Turtle.TurnLeft()
- An action.
- Turns the turtle 90 degrees to the left.
- Does not require a value.

4) Turtle.TurnRight()
- An action.
- Turns the turtle 90 degrees to right.
- Does not require a value.

5) Turtle. Turn(Angle)
- An action.
- Turn the turtle a specified degree.
- If you want, the turtle to turn clockwise write a positive angle, if you want it to
turn counter clockwise write a negative degree.

6) Turtle. Speed = value


- A property.

2
- Control the turtle’s speed.
- The valid values are 1 to 10 ( 1 is the slowest value and 10 is the fastest).

7) Turtle.PenUP()
- An action.
- Lifts the turtle’s pen up to stop it from writing while moving.

8) Turtle.PenDown()
- An action.
- Puts the pen down to allow the turtle to write while moving.

9) Turtle.Hide()
- An action.
- Hides the turtle from appearing.

3
The Graphics Window (Object):

The place where the output of your drawing appear.

1) GraphicsWindow.Title = “ title”
- A property.
- Sets the title for the GraphicsWindow.
- The quotation marks are very necessary if not written the program will not run due
to syntax error.

2) GraphicsWindow.Height = value
- A property.
- Sets the height for the GraphicsWindow.

3) GraphicsWindow.Width = value
- A property.
- Sets the width for the GraphicsWindow.

4)
GraphicsWindow.BackGroundColor= “color”
- A property.
- Sets the color for the background of the GraphicsWindow.
- Quotation mark is required.
5) GraphicsWindow.PenColor= “color”
- A property.
- Sets the color of the turtle’s pen.
- A property for the GraphicsWindow.
- Quotation mark is required.

4
6) GraphicWindow.GetRandomColor()
- An action.
- Sets a random color for the required property (PenColor and BackgroundColor).
- If not used as a value, it will not function.

Example:
GraphicsWindow.BackgroundColor = GraphicsWindow.GetRandomColor()
GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()

Notes:
- The Graphics Window as a property controls any tool carried by the turtle.
- Any change in the commands will stop the program from running due to a syntax
error.
- Commands are run by order, thus any command to change the look of the actions
(colors, shape) will only be apply to the commands bellow.
Example:
Turtle.Move(50)
GraphicsWindow.PenColor = “Brown”
The line drawn by the turtle will be black.

- Try reading the command and visualizing the movements done by it, to be able to
trace and draw every and each command.

Teacher Malak. supervisor Laila Hammad.

You might also like