<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=User%3A10.209.4.2</id>
		<title>User:10.209.4.2 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=User%3A10.209.4.2"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=User:10.209.4.2&amp;action=history"/>
		<updated>2026-04-17T18:43:33Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=User:10.209.4.2&amp;diff=3538&amp;oldid=prev</id>
		<title>Sneha: Created page with '{|border =1 !Visual Cue !Narration |- ||00.01 ||Hello everybody.  |- ||00.02 ||Welcome to this tutorial on '''Grammar of TurtleScript''' in '''KTurtle'''.  |- ||00.08  ||In this …'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=User:10.209.4.2&amp;diff=3538&amp;oldid=prev"/>
				<updated>2013-04-01T11:28:28Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{|border =1 !Visual Cue !Narration |- ||00.01 ||Hello everybody.  |- ||00.02 ||Welcome to this tutorial on &amp;#039;&amp;#039;&amp;#039;Grammar of TurtleScript&amp;#039;&amp;#039;&amp;#039; in &amp;#039;&amp;#039;&amp;#039;KTurtle&amp;#039;&amp;#039;&amp;#039;.  |- ||00.08  ||In this …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{|border =1&lt;br /&gt;
!Visual Cue&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
||00.01&lt;br /&gt;
||Hello everybody.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00.02&lt;br /&gt;
||Welcome to this tutorial on '''Grammar of TurtleScript''' in '''KTurtle'''. &lt;br /&gt;
|-&lt;br /&gt;
||00.08 &lt;br /&gt;
||In this tutorial, we will learn about&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00.11&lt;br /&gt;
|| Grammar of Turtle script  and  'if'-'else' condition&lt;br /&gt;
|-&lt;br /&gt;
||00.16&lt;br /&gt;
||To record this tutorial I am using,  Ubuntu Linux OS version. 12.04.  KTurtle version. 0.8.1 beta. &lt;br /&gt;
|-&lt;br /&gt;
|| 00.29&lt;br /&gt;
||We assume that you have basic working knowledge of KTurtle &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00.35&lt;br /&gt;
||If not, for relevant tutorials, please visit our website.  '''http://spoken-tutorial.org''' &lt;br /&gt;
|-&lt;br /&gt;
||00.40&lt;br /&gt;
||Let's open a new '''KTurtle''' Application. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00.43&lt;br /&gt;
||Click on '''Dash home'''.  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00.45&lt;br /&gt;
||In the Search bar, type '''KTurtle.''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00.49&lt;br /&gt;
||Click on the '''KTurtle''' icon. &lt;br /&gt;
|-&lt;br /&gt;
||00.52&lt;br /&gt;
||We  can also open  KTurtle  using '''Terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00.56&lt;br /&gt;
||Press '''CTRL+ALT+T''' simultaneously to open the '''Terminal'''.&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
||01.01&lt;br /&gt;
||Type '''KTurtle'''  and press enter   to open the '''KTurtle''' Application.&lt;br /&gt;
|-&lt;br /&gt;
||01.08&lt;br /&gt;
||Let's first look at '''TurtleScript'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.11&lt;br /&gt;
|| '''TurtleScript''' is a programming language &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.15&lt;br /&gt;
||It has different types of '''words and symbols''' used for '''various purposes''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.21 &lt;br /&gt;
|| It '''instructs''' Turtle what to do&lt;br /&gt;
|-&lt;br /&gt;
||01.25 &lt;br /&gt;
||'''Grammar of TurtleScript''' in ''' KTurtle''' includes- &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.30 &lt;br /&gt;
|| Comments&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.31&lt;br /&gt;
|| Commands&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.32&lt;br /&gt;
|| Numbers&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.33&lt;br /&gt;
|| Strings&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.34&lt;br /&gt;
|| Variables and&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.36&lt;br /&gt;
|| Boolean values&lt;br /&gt;
|-&lt;br /&gt;
||01.38&lt;br /&gt;
||Now we will see where to store numbers&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.42&lt;br /&gt;
||'''Numbers'''  can be stored in&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.44&lt;br /&gt;
|| Mathematical operators&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.46&lt;br /&gt;
||Comparison operators and&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.49&lt;br /&gt;
||Variables&lt;br /&gt;
|-&lt;br /&gt;
||01.50&lt;br /&gt;
||I will zoom the program text for clear view.&lt;br /&gt;
|-&lt;br /&gt;
||01.54&lt;br /&gt;
||First  let's look at variables. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01.57&lt;br /&gt;
||Variables are words that start with  ‘$’ sign, for example $a.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02.04&lt;br /&gt;
||In the editor they are highlighted in '''purple''' color. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.09&lt;br /&gt;
||Using the assignment, equal to (=), a variable is given its content. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.14&lt;br /&gt;
||Variables can contain  numbers '''$a=100'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.20&lt;br /&gt;
||strings '''$a=hello''' or &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.25&lt;br /&gt;
||boolean values that is true or false '''$a=true'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.32&lt;br /&gt;
||Variable keeps the content until program finishes execution or until it is reassigned to something else. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.41&lt;br /&gt;
||For example, consider the code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.44&lt;br /&gt;
||Let us type,'''$a = 2004''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.50&lt;br /&gt;
||'''$b = 25''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02.55&lt;br /&gt;
||'''print $a + $b''' &lt;br /&gt;
|-&lt;br /&gt;
||03.01&lt;br /&gt;
||Variable 'a' is assigned a  value ''' 2004.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||03.06&lt;br /&gt;
||Variable 'b' is assigned a value '''25''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||03.10&lt;br /&gt;
||'''print''' command, commands Turtle to write something on the canvas. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03.15&lt;br /&gt;
||'''print'''  command, takes numbers and strings as input. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||03.19&lt;br /&gt;
||'''print $a + $b'''  commands '''Turtle''' to add two values and display them on the canvas.&lt;br /&gt;
|-&lt;br /&gt;
|| 03.29&lt;br /&gt;
||Let's Run the code in '''slow''' speed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||03.34&lt;br /&gt;
||Value '''2029''' is displayed on the canvas&lt;br /&gt;
|-&lt;br /&gt;
||03.40&lt;br /&gt;
||Let us next see the Mathematical  Operators.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||03.44&lt;br /&gt;
||Mathematical operators include,&lt;br /&gt;
&lt;br /&gt;
* '''+''' (Addition) &lt;br /&gt;
&lt;br /&gt;
* '''-''' (Subtraction) &lt;br /&gt;
&lt;br /&gt;
* '''*''' (Multiplcation)  and&lt;br /&gt;
&lt;br /&gt;
* '''/''' (Division)&lt;br /&gt;
|-&lt;br /&gt;
||03.53&lt;br /&gt;
|| I will clear the current code from editor and type '''clear''' command and '''RUN''' to clean the canvas&lt;br /&gt;
|-&lt;br /&gt;
||04.01&lt;br /&gt;
||I already have a program in a text editor. &lt;br /&gt;
|-&lt;br /&gt;
||04.05&lt;br /&gt;
||I will Explain the code now&lt;br /&gt;
|-&lt;br /&gt;
||04.08&lt;br /&gt;
||'''“reset”''' command sets Turtle to its '''default''' position&lt;br /&gt;
|-&lt;br /&gt;
||04.12&lt;br /&gt;
||'''canvassize 200,200''' fixes the width and height of the canvas to 200 pixels each. &lt;br /&gt;
|-&lt;br /&gt;
||04.22&lt;br /&gt;
|| value '''1+1''' is assigned to the variable''' $add,''' &lt;br /&gt;
|-&lt;br /&gt;
||04.26&lt;br /&gt;
||Value '''20-5''' is assigned to variable '''$subtract''', &lt;br /&gt;
|-&lt;br /&gt;
||04.31&lt;br /&gt;
||value '''15 * 2''' is be assigned to the variable '''$multiply.''' &lt;br /&gt;
|-&lt;br /&gt;
||04.36&lt;br /&gt;
||'''30/30''' is assigned to the variable '''$divide.''' &lt;br /&gt;
|-&lt;br /&gt;
||04.40&lt;br /&gt;
||'''go 10,10''' commands to '''Turtle''' to go 10 pixels left of canvas and 10 pixels from top of canvas&lt;br /&gt;
|-&lt;br /&gt;
||04.52&lt;br /&gt;
||'''print''' command displays the varible on the canvas&lt;br /&gt;
|-&lt;br /&gt;
||04.56&lt;br /&gt;
||I will copy the code from text editor and paste it into '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||05.03&lt;br /&gt;
||Pause the tutorial and type the program into''' KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||05.08&lt;br /&gt;
||Resume the tutorial after typing the program&lt;br /&gt;
|-&lt;br /&gt;
||05.13&lt;br /&gt;
||Let us click on '''Run''' button  to run the program&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||05.17&lt;br /&gt;
||Command which is getting executed is highlighted on the editor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||05.22&lt;br /&gt;
||'''Turtle''' displays the values on the canvas at the specified positions. &lt;br /&gt;
|-&lt;br /&gt;
||05.34&lt;br /&gt;
||Let us consider a simple example for using  '''comparison operator''' .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05.41&lt;br /&gt;
|| I will clear the current code from editor and type '''clear''' command and '''RUN''' to clean the canvas&lt;br /&gt;
|-&lt;br /&gt;
|| 05.49&lt;br /&gt;
||I will  zoom the progrm text to have clear view&lt;br /&gt;
|-&lt;br /&gt;
|| 05.53&lt;br /&gt;
||Let's type &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||05.55&lt;br /&gt;
||'''$answer = 10 &amp;gt; 3'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.03&lt;br /&gt;
||'''print $answer'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.09&lt;br /&gt;
||Here 10 is compared to 3 with the ’'''greater than'''’ operator.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.14&lt;br /&gt;
||The result of this comparison, the '''boolean value true''' is stored in the &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.19&lt;br /&gt;
||variable '''$answer''' and the value '''true''' is displayed on the canvas.&lt;br /&gt;
|-&lt;br /&gt;
|| 06.27&lt;br /&gt;
||Let's run the code now&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.29&lt;br /&gt;
||'''Turtle''' displays '''Boolean value true''' on the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||06.34&lt;br /&gt;
||Now lets see how Strings work in this application –&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.39&lt;br /&gt;
||Strings can be put in variables like numbers &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.43&lt;br /&gt;
||Strings cannot be used in mathematical or comparison operators &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.49&lt;br /&gt;
||Strings are highlighted in red color &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||06.53&lt;br /&gt;
||KTurtle identifies a line in double quotes as a string&lt;br /&gt;
|-&lt;br /&gt;
|| 07.00&lt;br /&gt;
||I will clear the current code from editor.type '''clear''' command and '''Run''' to clean the canvas&lt;br /&gt;
|-&lt;br /&gt;
||  07.08&lt;br /&gt;
||Now  I will explain about Boolean values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07.11&lt;br /&gt;
||There are only two '''boolean''' values: '''true''' and '''false.''' &lt;br /&gt;
|-&lt;br /&gt;
||07.16&lt;br /&gt;
||For example  Let's type the code &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07.20&lt;br /&gt;
||'''$answer = 7&amp;lt;5'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07.28&lt;br /&gt;
||'''print $answer''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07.34&lt;br /&gt;
||'''Boolean value false''' is assigned to variable''' $answer'''  because 7 is greater than 5&lt;br /&gt;
|-&lt;br /&gt;
|| 07.43&lt;br /&gt;
||Let's Run the code now&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07.47&lt;br /&gt;
||'''Turtle''' diplays '''Boolean''' value '''false''' on the canvas.&lt;br /&gt;
|-&lt;br /&gt;
|| 07.51&lt;br /&gt;
||Let's next learn about “if-else” conditon.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07.56&lt;br /&gt;
||‘if’ condition is executed only if the '''boolean''' value evaluates ‘true’ &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||08.03&lt;br /&gt;
||‘else’ condition is executed only if the ‘if’ condition is ‘false’ .&lt;br /&gt;
|-&lt;br /&gt;
|| 08.09&lt;br /&gt;
||I will clear the current code from editor.type '''clear''' command and '''Run''' to clean the canvas&lt;br /&gt;
|-&lt;br /&gt;
||08.17&lt;br /&gt;
||I already have a code in a text file.&lt;br /&gt;
|-&lt;br /&gt;
|| 08.21&lt;br /&gt;
||This code compares  numbers 4 , 5 and 6 and  displays the results accordingly on the canvas.&lt;br /&gt;
|-&lt;br /&gt;
||08.30&lt;br /&gt;
||I will copy the code from text editor and paste it into '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||08.36&lt;br /&gt;
||Pause the tutorial and type the program into your '''KTurtle''' editor.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||08.42&lt;br /&gt;
||Resume the tutorial after typing the program&lt;br /&gt;
|-&lt;br /&gt;
|| 08.46&lt;br /&gt;
||Let's Run the code now&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||08.49&lt;br /&gt;
||the '''Turtle''' has compared the values 4 and 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||08.53&lt;br /&gt;
||and has displayed the  result 4 is smaller than 6 on the canvas . &lt;br /&gt;
|-&lt;br /&gt;
||09.00&lt;br /&gt;
||With this we come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.05&lt;br /&gt;
||Let's summarize.&lt;br /&gt;
|-&lt;br /&gt;
||09.07&lt;br /&gt;
||In this tutorial, we have learnt about &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.11&lt;br /&gt;
||Grammar of Turtle script  and&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.14&lt;br /&gt;
|| ‘if-else’ condition &lt;br /&gt;
|-&lt;br /&gt;
||09.17&lt;br /&gt;
||Now to the assignment part.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.19&lt;br /&gt;
||'''Solve an equation using'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.22&lt;br /&gt;
||if - else condition&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.24&lt;br /&gt;
|| Mathematical  and comparision  operators&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.27&lt;br /&gt;
|| Display the results using  “print” and “go” commands. &lt;br /&gt;
|-&lt;br /&gt;
||09.33&lt;br /&gt;
||To solve the assignment&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.35&lt;br /&gt;
||Choose any four random numbers&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.38&lt;br /&gt;
|| Multiply two sets of random numbers&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.42&lt;br /&gt;
|| Compare the results using the comparison operators&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.46&lt;br /&gt;
|| Display both the results &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.49&lt;br /&gt;
|| Display greater result at the  center of the canvas &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09.54&lt;br /&gt;
|| You can choose any equation which you like. &lt;br /&gt;
|-&lt;br /&gt;
||09.59&lt;br /&gt;
||Watch the video available at this URL '''http://spoken-tutorial.org/What is a Spoken Tutorial'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10.03&lt;br /&gt;
||It summarises the Spoken Tutorial project&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10.06&lt;br /&gt;
||If you do not have good bandwidth, you can download and watch it &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10.12&lt;br /&gt;
||The Spoken Tutorial Project Team : &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10.14&lt;br /&gt;
||Conducts workshops using spoken tutorials&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10.18&lt;br /&gt;
||Gives certificates to those who pass an online test &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10.22&lt;br /&gt;
||For more details, please write to  '''contact@spoken-tutorial.org''' &lt;br /&gt;
|-&lt;br /&gt;
|| 10.30&lt;br /&gt;
||Spoken Tutorial Project is a part of the Talk to a Teacher project &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10.35&lt;br /&gt;
||It is supported by the National Mission on Education through ICT, MHRD, Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||1043&lt;br /&gt;
||More information on this Mission is available at this link '''http://spoken-tutorial.org/NMEICT-Intro ]''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10.48&lt;br /&gt;
||The Script is contributed by '''ITfC Bangaluru.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10.52&lt;br /&gt;
||This is Madhuri Ganpathi from '''IIT Bombay'''  signing off Thank you for joining.&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Sneha</name></author>	</entry>

	</feed>