KTurtle/C3/Grammar-of-TurtleScript-Part-II/English
Resources for "Grammar of TurtleScript - Part II"
Title of script: Grammar of Turtle Script-Part II
Author: Sindhu
Keywords:
|
|
Slide 1 | Hi everyone,
|
Slide 2 | If this is the first time you are using KTurtle,
|
Slide 3 | Also view the tutorial Grammar of Turtle Script-Part I,
to understand few more commands used in the Kturtle environment.
|
Slide 4 | We will learn the
|
Slide 5 | For this demonstration, I am using the Linux Operating System Ubuntu v11.04, and Kturtle v0.8.1 beta.
|
Slide 6
|
'learn' Command
|
Switch to Kturtle Window
type the following code: repeat 4 { forward 10 turnleft 90 }
|
I will launch the Kturtle application
{ repeat 4 { forward $x turnleft 90 } }
{ repeat 4 { forward $x turnleft 90 } } go 200,200 square 100
|
Switch to Slide 5 | 'random' Command
$x=random 1,20
{ forward $x turnleft 10 }
|
Let us now use both the learn and random commands in an example.
canvassize 300,300
$G=random 0,255 $B=random 0,255
$blue=random 0,255 $green=random 0,255
repeat 36{ forward $x turnleft 10 } }
circle 5
circle 5
circle 5
circle 5
circle 10
| |
Switch to Slide 6
|
Assignment
|
Switch to Slide 7 | I would like to acknowledge the spoken tutorial project
which is part of the talk to a teacher project.
|
Switch to Slide 8 | Thank You.
|