Download presentation
1
Introducing the turtle
First steps in Small Basic
2
Learning 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
3
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?
4
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
5
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
6
Writing instructions You have to write the instructions very precisely or the computer won’t understand them The instructions you write are called program code - for example Turtle.PenDown() Turtle.Move(100) Turtle.TurnRight()
7
The Editor, where you will write your programs
Small Basic “Environment” Toolbar Help The Editor, where you will write your programs Editor
8
Introducing the turtle
We’ll start with “turtle graphics” Using the turtle we can draw shapes in different colours and sizes
9
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”
10
Your first program Use the pop-up box to help you type a line: Press
Turtle.Move(100) Press How can you use the instructions TurnRight and Move to draw a square?
11
. Screen coordinates The graphics screen has x and y coordinates x y
(600,500) x y (0,0) (200,100) .
12
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
13
Moving the turtle without drawing a line
Suppose you want to start drawing your square near the top right corner Turtle.PenUp() ’so line will not be drawn Turtle.MoveTo(100,100) ’move the turtle Turtle.Angle= ’make turtle face right Turtle.PenDown() ’put pen down
14
Drawing two squares Once you have drawn one square, you can put the pen up, move to a different starting point and draw another one! Now try the exercises on Worksheet 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.