Lesson 1
Lesson 1
TURTLE BASIC
OBJECTIVES
To explore the parts of the Small Basic window
Learn how to write and run a simple Small Basic program using turtle
graphics
Use Intellisense to type programs faster
Save a program
LANGUAGES
There are about 6,500 spoken languages like English, Urdu, Arabic
and Japanese in the world
There are about the same number of programming languages
maybe even more!
Can you name any of them?
PROGRAMMING LANGUAGES
Programming languages are used to give computers instructions on
what to do
One reason there are so many languages is that computers are used
in thousands of different ways
Many languages were invented for a specific purpose or application
SMALL BASIC
Small Basic was invented to be really easy for beginners to learn and
fun to use
You will be typing instructions for the computer to follow
WRITING INSTRUCTIONS
You have to write the instructions very precisely or the computer wont
understand them
The instructions you write are called program code - for example:
Turtle.PenDown()
Turtle.Move(100)
Turtle.TurnRight()
SMALL BASIC ENVIRONMENT
Toolbar
Help
Editor
INTRODUCING THE TURTLE
Using the turtle we can draw shapes in different colours and sizes
WRITING YOUR FIRST SMALL BASIC
PROGRAM
Start typing the word Turtle in the editor
A box pops up and you can double-click on the word you want
Microsoft calls this Intellisense
YOUR FIRST PROGRAM
Use the pop-up box to help you type a line:
Turtle.Move(100)
Press
Press
x
(200,100)
.(600,500)
SETTING THE SIZE OF THE GRAPHICS
WINDOW
You can change the size of the graphics window
To make the window 600 pixels wide and 400 pixels high:
GraphicsWindow.Width=600
GraphicsWindow.Height=400
MOVING THE TURTLE WITHOUT DRAWING
A LINE
Suppose you want to start drawing your square near the top right
corner