One system designed to teach students the basics of computer programming and control, is called ‘Turtle’ Graphics. A ‘turtle’ is an on-screen object that follows command given to it by the user. As the turtle moves around the screen it drags a ‘pen’ that leaves a trail behind it. The command language is called ‘LOGO’. LOGO has many commands, but the ones most commonly used are:
FORWARD n Move forwards n steps
BACKWARD n Move backwards n steps
LEFT n Turn left n degrees
RIGHT n Turn right n degrees
PENUP Lift the 'pen' up from the 'paper'
PENDOWN Drop the 'pen' down onto the 'paper'
REPEAT n . . .
END REPEAT Repeat the commands between these twno commands n times Using these commands, any number of shapes and patterns can be drawn.
FORWARD n Move forwards n steps
BACKWARD n Move backwards n steps
LEFT n Turn left n degrees
RIGHT n Turn right n degrees
PENUP Lift the 'pen' up from the 'paper'
PENDOWN Drop the 'pen' down onto the 'paper'
REPEAT n . . .
END REPEAT Repeat the commands between these twno commands n times Using these commands, any number of shapes and patterns can be drawn.
No comments:
Post a Comment