<?xml version="1.0" encoding="UTF-8" ?>
  <resource>
  <id>4855</id>
  <path>/www/nrich/html/content/id/4855/</path>
  <resourceTypeID>1</resourceTypeID>
  <last_published>2011-02-01T00:00:01</last_published>
  <indexXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;p&gt;&lt;a href=&quot;https://nrich.maths.org/8045&quot;&gt;First Forward Into Logo&lt;/a&gt;&lt;br&gt;&lt;/br&gt;
&lt;strong&gt;Previous:&lt;/strong&gt;&lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=4858&amp;amp;part=&quot;&gt; FF5&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In FF4 you investigated the instruction:&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
REPEAT 360 [FD 1 RT 1]&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Hopefully you altered it as you saw fit and produced some exciting shapes. So it is timely to introduce you to the idea of a variable . As the word implies, a &lt;span style=&quot;font-weight: bold;&quot;&gt;variable&lt;/span&gt; is something that varies, something that changes.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
You may find the following a quicker way of drawing circles and circular patterns. It is called a &lt;span style=&quot;font-weight: bold;&quot;&gt;procedure&lt;/span&gt; and has to be written in a particular way.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
TO CIRCLE :CH&lt;br&gt;&lt;/br&gt;
REPEAT 360 [ FD :CH RT 1]&lt;br&gt;&lt;/br&gt;
END&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Notice how the procedure is set out:&lt;br&gt;&lt;/br&gt;
First a title / a command TO CIRCLE&lt;br&gt;&lt;/br&gt;
then the variable :CH&lt;br&gt;&lt;/br&gt;
followed by the instructions REPEAT 360 [ FD :CH RT 1]&lt;br&gt;&lt;/br&gt;
then a formal closing of the procedure END&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
N.B. the variable, :CH could have been any letter or letters that you wish!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;br&gt;&lt;/br&gt;
&lt;table style=&quot;&quot; border=&quot;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div&gt;Now experiment with the procedure:&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
&lt;div&gt;CIRCLE 3&lt;/div&gt;
&lt;div&gt;CIRCLE 6&lt;/div&gt;
&lt;div&gt;CIRCLE -3&lt;/div&gt;
&lt;div&gt;CIRCLE 9&lt;/div&gt;
&lt;/td&gt;
&lt;td&gt;&lt;mdo:image alt=&quot;circles&quot; height=&quot;146&quot; src=&quot;logo6.gif&quot; width=&quot;207&quot;&gt;&lt;/mdo:image&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;&lt;/br&gt;
&lt;p&gt;Building on this idea of a procedure we could have written:&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
TO CIRC :CH :ANG&lt;br&gt;&lt;/br&gt;
REPEAT 360 [ FD :CH RT :ANG]&lt;br&gt;&lt;/br&gt;
END&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
This is a procedure with two variables!&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Can you anticipate what will change and what will happen now?&lt;br&gt;&lt;/br&gt;
Can you see what is now possible?&lt;br&gt;&lt;/br&gt;
Go on experiment! Try:&lt;br&gt;&lt;/br&gt;
CIRC 3 3&lt;br&gt;&lt;/br&gt;
CIRC 3 6&lt;br&gt;&lt;/br&gt;
CIRC 3 30&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
What is happening?&lt;/p&gt;
&lt;table style=&quot;&quot; border=&quot;&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div&gt;Why not be bolder and try say:&lt;/div&gt;
&lt;div&gt;CIRC 30 90&lt;/div&gt;
&lt;div&gt;CIRC 30 45&lt;/div&gt;
&lt;div&gt;CIRC 30 18 etc., etc.,&lt;/div&gt;
&lt;/td&gt;
&lt;td&gt;&lt;mdo:image alt=&quot;polygons&quot; height=&quot;249&quot; src=&quot;logo7.gif&quot; width=&quot;316&quot;&gt;&lt;/mdo:image&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;&lt;/br&gt;
&lt;p&gt;What do you notice?&lt;br&gt;&lt;/br&gt;
What conclusions can you come to?&lt;br&gt;&lt;/br&gt;
 &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Next:&lt;/strong&gt;&lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=4856&amp;amp;part=&quot;&gt; FF7&lt;/a&gt;&lt;br&gt;&lt;/br&gt;
 &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;/mdoxml&gt;</indexXML>
  <solutionXML/>
  <noteXML/>
  <clueXML/>
  <canonXML/>
  <end_user_role>2</end_user_role>
  <difficulty>3</difficulty>
  <keystage1>0</keystage1>
  <keystage2>0</keystage2>
  <keystage3>1</keystage3>
  <keystage4>1</keystage4>
  <keystage4plus>1</keystage4plus>
  <title>First Forward into Logo 6: Variables and Procedures</title>
  <description>Learn to write procedures and build them into Logo programs. Learn to use variables.</description>
  <spec_group>Algebra
    <specifier>Introducing algebra</specifier>
  </spec_group>
  <spec_group>Information and Communications Technology
    <specifier>Logo</specifier>
  </spec_group>
  <spec_group>Using, Applying and Reasoning about Mathematics
    <specifier>Practical Activity</specifier>
  </spec_group>
</resource>