<snapdata remixID="2074458"><project name="CSPrinciplesReferenceSheetSnap!" app="Snap! 7, https://snap.berkeley.edu" version="2"><notes>This is a Snap! version of the AP CSP Reference Sheet (July 2015 eduction).&#xD;&#xD;Enjoy using it to prepare for the CSP exam!&#xD;&#xD;-The BJC (Beauty and Joy of Computing) team</notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAABJpJREFUeF7tnUGO4jAUBc3xWmLHBsQCseMKCAk4I5wHGMFIrdFI5FsumySkekt/26lUnh2T7sxSSo/kzzcTmA354J6DU8AhnyE+NgXkDG0BEFBAAM9STkABOUNbAAQUEMCzlBNQQM7QFgABBQTwLOUEFJAztAVAQAEBPEs5AQXkDG0BEFBAAM9STkABOUNbAAQUEMCzlBNQQM7QFgABBQTwLOUEpi3g4+HTXl0OzWbN/WjeAblGmj8PqIDdp0cBGz+QqoAK2DkDtH4iWgEVUAHJIqVxrVOwU3BjxUxAE7BXxRRQARVwsASab8PQI49uYj6whqKH0Hf9tPcBKX0FpASTAhKECkjovWoVkCBUQEJPATE9BcQITUCCUAEJPRMQ01NAjNAEJAgVkNAzATE9BcQITUCCUAEJPRMQ01NAjNAEJAgVkNAzATE9BcQITUCCUAEJPRMQ01NAjNAEJAgVkNAzATE9BcQITUCCUAEJPRMQ01NAjNAEJAgVkNAzATE9BcQITUCCUAEJPRMQ01NAjNAEJAgVkND7ggQ8nU6dBM7nMyZkA+UEMv4uetwJqIDlcnyicvIC/vz8pMPhkNbrddput59gbh//EJi8gM8p+Hg8puv1+ovldrulzWaTFouFsjQmoIDnc3pO05fL5Rf1/X5Pq9UqLZfLxvhtfvICzufztN/vX2m32+004sMEJi+gd8EfNu6/7hTQbZheDfx6ASndvjeSx95/hfGPex9QARkBKhCtn/y/Z6sAEBkw9v4rjN8E7DIoYw2jgB0EMvgpoAK+JxAJZAKi/EmpAkA0grH3X2H8JqAJaAK+I9D8NQ0VrmAT0DVguQMK2PZ9ydEa0m2Y4IXVGQDL7X++CnTg/aODe9oVv/DaNaBrQKpZ+RrSBBx4AmUkCLInSmDUuAkY44tOQN8C9N1/TLD7NzLG7xTsFEw1cwouJmgCehfcGUDPG8ViuzIKFbApXu+CIwenLmDEJ/q8Aj/XgFNeA0aCRZ8rYEQo+LwCQDSCvvtHg6+zkW4CmoDlGla4gBRQARXwHQGfhom/Sy23p0KlCQghVgCIRtB3/2jwrgEpvuE/jZLxVRaHAFqocAGNew0YAQBsv6K0tcAR/4z+FfArTHtzEBkCoMNXwOBxKkT3C4oVkJ3E8C44ugJZ9+OvVkB2DhWQ8ct5GAD1EAVAxgXgGhCdgYEXZwiAjkABXQN2CqSA6PpKTsGMn1Mw5ecDqYNeItX4s9JBH2CYgFDwGgDRECqsoVD/tLjC+BWw6ySMYA1FHUL1Cojw+V0wxFdjBjEBTcByDU3AcnavygoA0Qj67h8Nvg4/E9AELNewwgWkgAqogO8IuA3T+JH8KMHK1fxbmbGLYAJOOQEVsPsSMwFNQBrCqF4BFRAJRIsVUAGpQ6heARUQCUSLFVABqUOoXgEVEAlEi5sLSAdoPSYw7X1AjM8GKAEFpAStRwQUEOGzmBJQQErQekRAARE+iykBBaQErUcEFBDhs5gSUEBK0HpEQAERPospAQWkBK1HBBQQ4bOYElBAStB6REABET6LKQEFpAStRwQUEOGzmBIYtIB/AKVquJewpjYBAAAAAElFTkSuQmCC</thumbnail><scenes select="1"><scene name="CSPrinciplesReferenceSheetSnap!"><notes>This is a Snap! version of the AP CSP Reference Sheet (July 2015 eduction).&#xD;&#xD;Enjoy using it to prepare for the CSP exam!&#xD;&#xD;-The BJC (Beauty and Joy of Computing) team</notes><hidden></hidden><headers></headers><code></code><blocks><block-definition s="%&apos;variable&apos; $arrowLeft %&apos;value&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>variable</l><block var="value"/></block></script></block-definition><block-definition s="RANDOM %&apos;a&apos; , %&apos;b&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportRandom"><block var="a"/><block var="b"/></block></block></script></block-definition><block-definition s="%&apos;A&apos; ≠ %&apos;B&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportNot"><block s="reportEquals"><l></l><l></l></block></block></block></script></block-definition><block-definition s="%&apos;A&apos; ≥ %&apos;B&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportOr"><block s="reportGreaterThan"><block var="A"/><block var="B"/></block><block s="reportEquals"><block var="A"/><block var="B"/></block></block></block></script></block-definition><block-definition s="%&apos;A&apos; ≤ %&apos;B&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportOr"><block s="reportLessThan"><block var="A"/><block var="B"/></block><block s="reportEquals"><block var="A"/><block var="B"/></block></block></block></script></block-definition><block-definition s="INPUT" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doAsk"><l></l></block><block s="doReport"><block s="getLastAnswer"></block></block></script></block-definition><block-definition s="REPEAT %&apos;N&apos; TIMES %&apos;BLOCK&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%cs"></input></inputs><script><block s="doRepeat"><block var="N"/><script><block s="doRun"><block var="BLOCK"/><list></list></block></script></block></script></block-definition><block-definition s="%&apos;data&apos; %&apos;index&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportListItem"><block var="index"/><block var="data"/></block></block></script></block-definition><block-definition s="%&apos;datain&apos; %&apos;indexin&apos; $arrowLeft %&apos;dataout&apos; %&apos;indexout&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input><input type="%l"></input><input type="%n"></input></inputs><script><block s="doReplaceInList"><block var="indexin"/><block var="datain"/><custom-block s="%l %n"><block var="dataout"/><block var="indexout"/></custom-block></block></script></block-definition><block-definition s="%&apos;data&apos; $arrowLeft %&apos;arg&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%mult%s"></input></inputs><script><block s="doSetVar"><l>data</l><block var="arg"/></block></script></block-definition><block-definition s="map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block></list></block></block></block></script><list><l>data</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportListItem"><l>1</l><block var="data lists"/></block></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></list></block></block></block></script><list><l>data lists</l></list></block></block><block s="doIfElse"><custom-block s="empty? %l"><block s="reportCDR"><block var="lists"/></block></custom-block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/></list></block></block></script></block></script></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="keep items such that %&apos;pred&apos; from %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script><script><block s="doReport"><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></script></block></script></block></script></block-definition><block-definition s="combine with %&apos;function&apos; items of %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="data"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="data"/></block></block></script></block><block s="doReport"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="combine with %repRing items of %l"><block var="function"/><block s="reportCDR"><block var="data"/></block></custom-block></list></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; then %&apos;true&apos; else %&apos;false&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%anyUE"></input><input type="%anyUE"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doReport"><block s="evaluate"><block var="true"/><list></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="false"/><list></list></block></block></script></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>step</l><l>tester</l></list></block><block s="doIfElse"><block s="reportGreaterThan"><block var="start"/><block var="end"/></block><script><block s="doSetVar"><l>step</l><l>-1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportLessThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>step</l><l>1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportGreaterThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doUntil"><block s="evaluate"><block var="tester"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block><block s="doChangeVar"><l>i</l><block var="step"/></block></script></block></script></block-definition><block-definition s="join words %&apos;words&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="words"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="words"/></block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="words"/></block><l> </l><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></list></block></block></script></block></script></block-definition><block-definition s="list $arrowRight sentence %&apos;data&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><custom-block s="join words %mult%txt"><block var="data"/></custom-block></block></script></block></script></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="text"/><l><option>whitespace</option></l></block></block></script></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">catchtag</input></inputs><script><block s="doRun"><block var="cont"/><list></list></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;value&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doReport"><block s="evaluate"><block var="value"/><list></list></block></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definition s="throw %&apos;tag&apos; %&apos;value&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">catchtag</input><input type="%s"></input></inputs><script><block s="doRun"><block var="tag"/><list><block var="value"/></list></block></script></block-definition><block-definition s="for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block s="doUntil"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; do %&apos;action&apos; and pause all $pause-1-255-220-0" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>breakpoint</l></list></block><block s="doIf"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doSetVar"><l>breakpoint</l><block var="test"/></block><block s="doShowVar"><l>breakpoint</l></block><block s="doRun"><block var="action"/><list></list></block><block s="doPauseAll"></block><block s="doHideVar"><l></l></block></script></block></script></block-definition><block-definition s="word $arrowRight list %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="word"/><l><option>letter</option></l></block></block></script></block></script></block-definition><block-definition s="ignore %&apos;x&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="tell %&apos;sprite&apos; to %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%cs"></input></inputs><script><block s="doRun"><block s="reportAttributeOf"><block var="action"/><block var="sprite"/></block><list></list></block></script></block-definition><block-definition s="ask %&apos;sprite&apos; for %&apos;expression&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportAttributeOf"><block var="expression"/><block var="sprite"/></block><list></list></block></block></script></block-definition><block-definition s="list $arrowRight word %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportJoinWords"><block var="list"/></block></block></script></block></script></block-definition><block-definition s="FOR EACH %&apos;item&apos; IN %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block s="doUntil"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></block></script></block-definition><block-definition s="INSERT %&apos;data&apos; %&apos;i&apos; %&apos;value&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input><input type="%s"></input></inputs><script><block s="doInsertInList"><block var="value"/><block var="i"/><block var="data"/></block></script></block-definition><block-definition s="APPEND %&apos;data&apos; %&apos;value&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input></inputs><script><block s="doAddToList"><block var="value"/><block var="data"/></block></script></block-definition><block-definition s="REMOVE %&apos;data&apos; %&apos;i&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><block s="doDeleteFromList"><block var="i"/><block var="data"/></block></script></block-definition><block-definition s="LENGTH %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block></block></script></block-definition><block-definition s="label %&apos;text&apos; of size %&apos;size&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%txt">Hello!</input><input type="%n">12</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>text</l><l>size</l></list><l>var stage = this.parentThatIsA(StageMorph),&#xD;    context = stage.penTrails().getContext(&apos;2d&apos;),&#xD;    rotation = radians(this.direction() - 90),&#xD;    trans = new Point(&#xD;      this.center().x - stage.left(),&#xD;      this.center().y - stage.top()&#xD;    ),&#xD;    ide = this.parentThatIsA(IDE_Morph),&#xD;    isWarped = this.Warped,&#xD;    len,&#xD;    pos;&#xD;&#xD;if (isWarped) {endWarp(); }&#xD;context.save();&#xD;context.font = size + &apos;px monospace&apos;;&#xD;context.textAlign = &apos;left&apos;;&#xD;context.textBaseline = &apos;alphabetic&apos;;&#xD;context.fillStyle = this.color.toString();&#xD;len = context.measureText(text).width;&#xD;trans = trans.multiplyBy(1 / stage.scale);&#xD;context.translate(trans.x, trans.y);&#xD;context.rotate(rotation);&#xD;context.fillText(text, 0, 0);&#xD;context.translate(-trans.x, -trans.y);&#xD;context.restore();&#xD;pos = new Point(&#xD;  len * Math.sin(radians(this.direction())),&#xD;  len * Math.cos(radians(this.direction())));&#xD;pos = pos.add(new Point(this.xPosition(), this.yPosition()));&#xD;this.gotoXY(pos.x, pos.y, false);&#xD;this.changed();&#xD;if (isWarped) {this.startWarp(); }&#xD;stage.changed();</l></block><list><block var="text"/><block var="size"/></list></block></script></block-definition><block-definition s="DISPLAY %&apos;expression&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIfElse"><custom-block s="%s ≤ %s"><block s="reportVariadicSum"><list><block var="CHARACTERS"/><block s="reportStringSize"><block var="expression"/></block></list></block><l>20</l></custom-block><script><custom-block s="label %txt of size %n"><block var="expression"/><l>36</l></custom-block><block s="doChangeVar"><l>CHARACTERS</l><block s="reportStringSize"><block var="expression"/></block></block></script><script><block s="doDeclareVariables"><list><l>leftthisrow</l></list></block><block s="doSetVar"><l>leftthisrow</l><block s="reportDifference"><l>20</l><block var="CHARACTERS"/></block></block><custom-block s="label %txt of size %n"><block s="reportJoinWords"><list><custom-block s="JS Substring %s from %n through %n"><block var="expression"/><l>1</l><block var="leftthisrow"/></custom-block><l>\</l></list></block><l>36</l></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><custom-block s="JS Substring %s from %n through %n"><block var="expression"/><block s="reportVariadicSum"><list><block var="leftthisrow"/><l>1</l></list></block><block s="reportStringSize"><block var="expression"/></block></custom-block></custom-block></script></block></script></block-definition><block-definition s="reset display" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doSwitchToCostume"><l>Cursor</l></block><block s="doSetVar"><l>CHARACTERS</l><l>0</l></block><block s="clear"></block><block s="gotoXY"><l>-220</l><l>190</l></block><block s="setPenColorDimension"><l><option>brightness</option></l><l>0</l></block><block s="setHeading"><l>90</l></block><block s="show"></block></script></block-definition><block-definition s="newline" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="gotoXY"><l>-220</l><block s="reportDifference"><block s="yPosition"></block><l>36</l></block></block><block s="doSetVar"><l>CHARACTERS</l><l>0</l></block></script><scripts><script x="151.5" y="17.099999999999994"><custom-block s="tell %s to %cs"><l>Displayer</l><script><block s="gotoXY"><l>-220</l><block s="reportDifference"><block s="yPosition"></block><l>36</l></block></block></script></custom-block><block s="doSetVar"><l>CHARACTERS</l><l>0</l></block></script></scripts></block-definition><block-definition s="$stage draw grid" type="command" category="pen"><comment x="0" y="0" w="128.5" collapsed="false">Draw a grid on the stage. This is an extra block, NOT on the reference sheet.</comment><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="tell %s to %cs"><custom-block s="clone"></custom-block><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>SLOT</l><l>X</l><l>Y</l></list></block><block s="doSetVar"><l>SLOT</l><l>32</l></block><block s="doSetVar"><l>X</l><l>-240</l></block><block s="doSetVar"><l>Y</l><block s="reportVariadicSum"><list><l>-240</l><block var="SLOT"/></list></block></block><block s="setHeading"><l>90</l></block><block s="doRepeat"><l>14</l><script><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="down"></block><block s="forward"><l>480</l></block><block s="up"></block><block s="doChangeVar"><l>Y</l><block var="SLOT"/></block></script></block><block s="setHeading"><l>0</l></block><block s="doSetVar"><l>X</l><block s="reportVariadicSum"><list><l>-240</l><block var="SLOT"/></list></block></block><block s="doSetVar"><l>Y</l><l>-240</l></block><block s="doRepeat"><l>14</l><script><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="down"></block><block s="forward"><l>480</l></block><block s="up"></block><block s="doChangeVar"><l>X</l><block var="SLOT"/></block></script></block></script></block><block s="removeClone"></block></script></custom-block></script></block-definition><block-definition s="MOVE_FORWARD" type="command" category="motion"><header></header><code></code><translations></translations><inputs></inputs><script><block s="forward"><l>32</l></block></script></block-definition><block-definition s="$robot reset" type="command" category="motion"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="tell %s to %cs"><l>Displayer</l><script><block s="hide"></block></script></custom-block><block s="gotoXY"><l>0</l><l>0</l></block><block s="setHeading"><l>0</l></block><block s="doSwitchToCostume"><l>Arrow</l></block><block s="goToLayer"><l><option>front</option></l></block><block s="show"></block></script></block-definition><block-definition s="ROTATE_RIGHT" type="command" category="motion"><header></header><code></code><translations></translations><inputs></inputs><script><block s="turn"><l>90</l></block></script></block-definition><block-definition s="ROTATE_LEFT" type="command" category="motion"><header></header><code></code><translations></translations><inputs></inputs><script><block s="turnLeft"><l>90</l></block></script></block-definition><block-definition s="CAN_MOVE %&apos;direction&apos;" type="predicate" category="motion"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">forward<options>left&#xD;right&#xD;forward&#xD;backward</options></input></inputs><script><block s="doDeclareVariables"><list><l>can move?</l></list></block><custom-block s="tell %s to %cs"><custom-block s="clone"></custom-block><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block var="direction"/><l>right</l></block><script><custom-block s="ROTATE_RIGHT"></custom-block></script></block><block s="doIf"><block s="reportEquals"><block var="direction"/><l>left</l></block><script><custom-block s="ROTATE_LEFT"></custom-block></script></block><block s="doIf"><block s="reportEquals"><block var="direction"/><l>backward</l></block><script><custom-block s="ROTATE_LEFT"></custom-block><custom-block s="ROTATE_LEFT"></custom-block></script></block><custom-block s="MOVE_FORWARD"></custom-block><block s="setScale"><l>10</l></block><block s="doSetVar"><l>can move?</l><block s="reportNot"><block s="reportTouchingColor"><color>0,0,0,1</color></block></block></block></script></block><block s="removeClone"></block></script></custom-block><block s="doReport"><block var="can move?"/></block></script></block-definition><block-definition s="toggle cell state" type="command" category="pen"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>X</l><l>Y</l><l>state</l></list></block><block s="doWarp"><script><custom-block s="tell %s to %cs"><custom-block s="clone"></custom-block><script><block s="doSetVar"><l>X</l><block s="xPosition"></block></block><block s="doSetVar"><l>Y</l><block s="yPosition"></block></block><block s="gotoXY"><block s="reportVariadicProduct"><list><l>32</l><block s="reportRound"><block s="reportQuotient"><block s="reportMouseX"></block><l>32</l></block></block></list></block><block s="reportVariadicProduct"><list><l>32</l><block s="reportRound"><block s="reportQuotient"><block s="reportMouseY"></block><l>32</l></block></block></list></block></block><block s="doSetVar"><l>state</l><custom-block s="Cell State"></custom-block></block><block s="doIfElse"><block s="reportEquals"><block var="state"/><l>White</l></block><script><block s="doSwitchToCostume"><l>Black</l></block></script><script><block s="doIfElse"><block s="reportEquals"><block var="state"/><l>Black</l></block><script><block s="doSwitchToCostume"><l>Grey</l></block></script><script><block s="doIf"><block s="reportEquals"><block var="state"/><l>Grey</l></block><script><block s="doSwitchToCostume"><l>White</l></block></script></block></script></block></script></block><block s="doStamp"></block><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="removeClone"></block></script></custom-block></script></block></script></block-definition><block-definition s="Cell State" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>state</l><l>size</l></list></block><block s="doSetVar"><l>size</l><block s="getScale"></block></block><block s="setScale"><l>50</l></block><block s="doIfElse"><block s="reportTouchingColor"><color>127,127,127,1</color></block><script><block s="doSetVar"><l>state</l><l>Grey</l></block></script><script><block s="doIfElse"><block s="reportTouchingColor"><color>0,0,0,1</color></block><script><block s="doSetVar"><l>state</l><l>Black</l></block></script><script><block s="doSetVar"><l>state</l><l>White</l></block></script></block></script></block><block s="setScale"><block var="size"/></block></script></block><block s="doReport"><block var="state"/></block></script><scripts><script x="240.5" y="13.500000000000007"><block s="doDeclareVariables"><list><l>state</l><l>size</l></list></block><block s="doWarp"><script><block s="hide"></block><custom-block s="tell %s to %cs"><custom-block s="clone"></custom-block><script><block s="doSetVar"><l>size</l><block s="getScale"></block></block><block s="setScale"><l>50</l></block><block s="doIfElse"><block s="reportTouchingColor"><color>127,127,127,1</color></block><script><block s="doSetVar"><l>state</l><l>Grey</l></block></script><script><block s="doIfElse"><block s="reportTouchingColor"><color>0,0,0,1</color></block><script><block s="doSetVar"><l>state</l><l>Black</l></block></script><script><block s="doSetVar"><l>state</l><l>White</l></block></script></block></script></block><block s="removeClone"></block></script></custom-block><block s="show"></block></script></block><block s="doReport"><block var="state"/></block></script></scripts></block-definition><block-definition s="all but first letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="199" collapsed="false">Takes a text string as input, and reports a new text string containing all but the first character of the input.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l><l>i</l></list></block><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="string"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportVariadicSum"><list><l>0</l><l>0</l></list></block></block></block></script></block><block s="doSetVar"><l>result</l><l></l></block><block s="doSetVar"><l>i</l><l>2</l></block><block s="doUntil"><block s="reportGreaterThan"><block var="i"/><block s="reportStringSize"><block var="string"/></block></block><script><block s="doSetVar"><l>result</l><block s="reportJoinWords"><list><block var="result"/><block s="reportLetter"><block var="i"/><block var="string"/></block></list></block></block><block s="doChangeVar"><l>i</l><l>1</l></block></script></block><block s="doReport"><block var="result"/></block></script></block></script></block-definition><block-definition s="all but first word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="223.000001" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing all but the first word, with one space between words and no spaces at the beginning or end. (Note: consider using SENTENCE-&gt;LIST and processing the resulting list instead of doing recursion on sentences in text string form.  List operations are faster.)</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>bf</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>bf</l><l></l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportGreaterThan"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><script><block s="doSetVar"><l>bf</l><block s="reportJoinWords"><list><block var="bf"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block var="bf"/></block></script></block></script></block-definition><block-definition s="all but last letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="218" collapsed="false">Takes a text string as input, and reports a new text string containing all but the last letter of the input.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l><l>i</l></list></block><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="string"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportVariadicSum"><list><l>0</l><l>0</l></list></block></block></block></script></block><block s="doSetVar"><l>result</l><l></l></block><block s="doSetVar"><l>i</l><l>1</l></block><block s="doUntil"><block s="reportEquals"><block var="i"/><block s="reportStringSize"><block var="string"/></block></block><script><block s="doSetVar"><l>result</l><block s="reportJoinWords"><list><block var="result"/><block s="reportLetter"><block var="i"/><block var="string"/></block></list></block></block><block s="doChangeVar"><l>i</l><l>1</l></block></script></block><block s="doReport"><block var="result"/></block></script></block></script></block-definition><block-definition s="all but last word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="212" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing all but the last word, with one space between words and no spaces at the beginning or end.  (Note: consider using SENTENCE-&gt;LIST and processing the resulting list instead of doing recursion on sentences in text string form.  List operations are faster.)</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>bl</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>bl</l><l></l></block><block s="doSetVar"><l>index</l><block s="reportStringSize"><block var="sentence"/></block></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="index"/><l>1</l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportLessThan"><block var="index"/><l>1</l></block><script><block s="doSetVar"><l>bl</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="bl"/></list></block></block><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doReport"><block var="bl"/></block></script></block></script></block-definition><block-definition s="first word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="236" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing only the first word, with no spaces before or after it.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>first</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>first</l><l></l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>first</l><block s="reportJoinWords"><list><block var="first"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>first</l><block s="reportJoinWords"><list><block var="first"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block></script></block><block s="doReport"><block var="first"/></block></script></block></script></block-definition><block-definition s="last letter of %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="260" collapsed="false">Takes a text string as input, and reports the last character in the string.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportLetter"><block s="reportStringSize"><block var="word"/></block><block var="word"/></block></block></script></block-definition><block-definition s="last word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="262" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing only the last word of the input, with no spaces before or after it.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>last</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>last</l><l></l></block><block s="doSetVar"><l>index</l><block s="reportStringSize"><block var="sentence"/></block></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>last</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="last"/></list></block></block><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>last</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="last"/></list></block></block></script></block><block s="doReport"><block var="last"/></block></script></block></script></block-definition><block-definition s="empty word? %&apos;word&apos;" type="predicate" category="operators"><comment x="0" y="0" w="208" collapsed="false">Takes a text string as input, and reports TRUE if the string has no characters in it of any kind, otherwise false.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportEquals"><block s="reportStringSize"><block var="word"/></block><l>0</l></block></block></script></block-definition><block-definition s="empty sentence? %&apos;sentence&apos;" type="predicate" category="operators"><comment x="0" y="0" w="221" collapsed="false">Takes a text string as input, and reports TRUE if the input contains no characters other than spaces (therefore, no words when the string is considered as a sentence), otherwise FALSE.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l></list></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></script></block-definition><block-definition s="Load Maze %&apos;maze&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>X</l><l>Y</l><l>slot</l><l>row</l><l>cursor</l></list></block><block s="doSwitchToCostume"><l>Arrow</l></block><custom-block s="tell %s to %cs"><custom-block s="clone"></custom-block><script><block s="doWarp"><script><block s="clear"></block><custom-block s="$stage draw grid"></custom-block><block s="setHeading"><l>90</l></block><block s="doSetVar"><l>row</l><l>7</l></block><custom-block s="for each %upvar of %l %cs"><l>line</l><block s="reportTextSplit"><block var="maze"/><l><option>line</option></l></block><script><block s="gotoXY"><block s="reportVariadicProduct"><list><l>32</l><l>-7</l></list></block><block s="reportVariadicProduct"><list><l>32</l><block var="row"/></list></block></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><l>15</l><script><block s="doSetVar"><l>slot</l><block s="reportLetter"><block var="i"/><block var="line"/></block></block><block s="doIfElse"><block s="reportEquals"><block var="slot"/><l>*</l></block><script><block s="doSwitchToCostume"><l>Black</l></block><block s="doStamp"></block></script><script><block s="doIfElse"><block s="reportEquals"><block var="slot"/><l>G</l></block><script><block s="doSwitchToCostume"><l>Grey</l></block><block s="doStamp"></block></script><script><block s="doIf"><block s="reportListContainsItem"><block s="reportNewList"><list><l>^</l><l>v</l><l>&lt;</l><l>&gt;</l></list></block><block var="slot"/></block><script><block s="doSetVar"><l>X</l><block s="xPosition"></block></block><block s="doSetVar"><l>Y</l><block s="yPosition"></block></block><block s="doSetVar"><l>cursor</l><block var="slot"/></block></script></block></script></block></script></block><custom-block s="MOVE_FORWARD"></custom-block></script></custom-block><block s="doChangeVar"><l>row</l><l>-1</l></block></script></custom-block></script></block><block s="removeClone"></block></script></custom-block><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="setHeading"><custom-block s="if %b then %anyUE else %anyUE"><block s="reportEquals"><block var="cursor"/><l>^</l></block><l>0</l><custom-block s="if %b then %anyUE else %anyUE"><block s="reportEquals"><block var="cursor"/><l>&gt;</l></block><l>90</l><custom-block s="if %b then %anyUE else %anyUE"><block s="reportEquals"><block var="cursor"/><l>V</l></block><l>180</l><l>-90</l></custom-block></custom-block></custom-block></block><block s="show"></block></script></block-definition><block-definition s="$robot at goal?" type="predicate" category="motion"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><block s="hide"></block><block s="doDeclareVariables"><list><l>at goal</l></list></block><custom-block s="tell %s to %cs"><custom-block s="clone"></custom-block><script><block s="setScale"><l>10</l></block><block s="doSetVar"><l>at goal</l><block s="reportTouchingColor"><color>127,127,127,1</color></block></block><block s="removeClone"></block></script></custom-block><block s="show"></block></script></block><block s="doReport"><block var="at goal"/></block></script></block-definition><block-definition s="$robot follow left wall until goal" type="command" category="motion"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doUntil"><custom-block s="$robot at goal?"></custom-block><script><block s="doIfElse"><custom-block s="CAN_MOVE %s"><l>left</l></custom-block><script><custom-block s="ROTATE_LEFT"></custom-block><custom-block s="MOVE_FORWARD"><comment w="154" collapsed="false">With maze searching using the &quot;follow a wall&quot; approach, it&apos;s critical you rotate AND move when one of the sides is free. </comment></custom-block></script><script><block s="doIfElse"><custom-block s="CAN_MOVE %s"><l>forward</l></custom-block><script><custom-block s="MOVE_FORWARD"></custom-block></script><script><block s="doIfElse"><custom-block s="CAN_MOVE %s"><l>right</l></custom-block><script><custom-block s="ROTATE_RIGHT"></custom-block><custom-block s="MOVE_FORWARD"><comment w="40" collapsed="false">Ditto</comment></custom-block></script><script><custom-block s="ROTATE_LEFT"></custom-block><custom-block s="ROTATE_LEFT"></custom-block></script></block></script></block></script></block></script></block></script></block-definition><block-definition s="JS Substring %&apos;sentence&apos; from %&apos;start&apos; through %&apos;end&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>string</l><l>start</l><l>end</l></list><l>return string.substring(start-1,end);</l></block><list><block var="sentence"/><block var="start"/><block var="end"/></list></block></block></script></block-definition><block-definition s="Get Maze" type="reporter" category="pen"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>original X</l><l>original Y</l><l>mazestring</l><l>state</l></list></block><block s="doSetVar"><l>mazestring</l><l></l></block><block s="doSetVar"><l>original X</l><block s="reportRound"><block s="reportQuotient"><block s="xPosition"></block><l>32</l></block></block></block><block s="doSetVar"><l>original Y</l><block s="reportRound"><block s="reportQuotient"><block s="yPosition"></block><l>32</l></block></block></block><custom-block s="tell %s to %cs"><custom-block s="clone"></custom-block><script><block s="doWarp"><script><block s="setHeading"><l>90</l></block><custom-block s="for %upvar = %n to %n %cs"><l>Y</l><l>7</l><l>-7</l><script><custom-block s="for %upvar = %n to %n %cs"><l>X</l><l>-7</l><l>7</l><script><block s="gotoXY"><block s="reportVariadicProduct"><list><l>32</l><block var="X"/></list></block><block s="reportVariadicProduct"><list><l>32</l><block var="Y"/></list></block></block><block s="doIfElse"><block s="reportAnd"><block s="reportEquals"><block var="X"/><block var="original X"/></block><block s="reportEquals"><block var="Y"/><block var="original Y"/></block></block><script><block s="doSetVar"><l>state</l><block s="reportModulus"><block s="reportAttributeOf"><l><option>direction</option></l><l>Robot</l></block><l>360</l></block></block><block s="doSetVar"><l>mazestring</l><block s="reportJoinWords"><list><block var="mazestring"/><custom-block s="if %b then %anyUE else %anyUE"><block s="reportEquals"><block var="state"/><l>90</l></block><l>&gt;</l><custom-block s="if %b then %anyUE else %anyUE"><block s="reportEquals"><block var="state"/><l>0</l></block><l>^</l><custom-block s="if %b then %anyUE else %anyUE"><block s="reportEquals"><block var="state"/><l>180</l></block><l>v</l><l>&lt;</l></custom-block></custom-block></custom-block></list></block></block></script><script><block s="doSetVar"><l>state</l><custom-block s="Cell State"></custom-block></block><block s="doSetVar"><l>mazestring</l><block s="reportJoinWords"><list><block var="mazestring"/><custom-block s="if %b then %anyUE else %anyUE"><block s="reportEquals"><block var="state"/><l>Black</l></block><l>*</l><custom-block s="if %b then %anyUE else %anyUE"><block s="reportEquals"><block var="state"/><l>Grey</l></block><l>G</l><l> </l></custom-block></custom-block></list></block></block></script></block></script></custom-block><block s="doSetVar"><l>mazestring</l><block s="reportJoinWords"><list><block var="mazestring"/><block s="reportUnicodeAsLetter"><l>10</l></block></list></block></block></script></custom-block></script></block><block s="removeClone"></block></script></custom-block><block s="doReport"><block var="mazestring"/></block></script></block-definition><block-definition s="%&apos;x&apos; MOD %&apos;y&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportModulus"><block var="x"/><block var="y"/></block></block></script></block-definition><block-definition s="IF %&apos;test&apos; %&apos;then&apos; ELSE %&apos;else&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%cs"></input><input type="%cs"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doRun"><block var="then"/><list></list></block></script><script><block s="doRun"><block var="else"/><list></list></block></script></block></script></block-definition><block-definition s="%&apos;x&apos; * %&apos;y&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportVariadicProduct"><list><block var="x"/><block var="y"/></list></block></block></script></block-definition><block-definition s="NOT %&apos;boolean&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%b"></input></inputs><script><block s="doReport"><block s="reportNot"><block var="boolean"/></block></block></script></block-definition><block-definition s="%&apos;x&apos; AND %&apos;y&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%b"></input></inputs><script><block s="doReport"><block s="reportAnd"><block var="x"/><block var="y"/></block></block></script></block-definition><block-definition s="%&apos;x&apos; OR %&apos;y&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%b"></input></inputs><script><block s="doReport"><block s="reportOr"><block var="x"/><block var="y"/></block></block></script></block-definition><block-definition s="IF %&apos;test&apos; %&apos;then&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%cs"></input></inputs><script><block s="doIf"><block var="test"/><script><block s="doRun"><block var="then"/><list></list></block></script></block></script></block-definition><block-definition s="REPEAT UNTIL %&apos;test&apos; %&apos;code&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doUntil"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doRun"><block var="code"/><list></list></block></script></block></script></block-definition><block-definition s="clone" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs></inputs><script><block s="createClone"><l><option>myself</option></l></block><block s="doReport"><block s="reportListItem"><l><option>last</option></l><block s="reportGet"><l><option>clones</option></l></block></block></block></script></block-definition><block-definition s="%&apos;var&apos; $arrowLeftOutline %&apos;value&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%anyUE"></input><input type="%s"></input></inputs><script><block s="doRun"><block s="reifyScript"><script><block s="doSetVar"><l></l><block var="value"/></block></script><list></list></block><list><block var="var"/></list></block></script></block-definition><block-definition s="CED Q5" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="clear"></block><custom-block s="Load Maze %s"><block var="CED Q5 MAZE"/></custom-block><custom-block s="%upvar $arrowLeft %s"><l>n</l><l>3</l></custom-block><custom-block s="REPEAT %n TIMES %cs"><l>3</l><script><custom-block s="REPEAT %n TIMES %cs"><block var="n"/><script><custom-block s="MOVE_FORWARD"></custom-block></script></custom-block><custom-block s="ROTATE_LEFT"></custom-block><custom-block s="%anyUE $arrowLeftOutline %s"><block var="n"/><block s="reportDifference"><block var="n"/><l>1</l></block></custom-block></script></custom-block><block s="bubble"><l>Answer: A</l></block></script></block-definition><block-definition s="CED Q8" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="clear"></block><custom-block s="%upvar $arrowLeft %mult%s"><l>maze numbers</l><list><l>1</l><l>2</l><l>3</l><l>4</l></list></custom-block><custom-block s="FOR EACH %upvar IN %l %cs"><l>maze number</l><block var="maze numbers"/><script><custom-block s="Load Maze %s"><block s="reportListItem"><block var="maze number"/><block s="reportNewList"><list><block var="CED Q8a MAZE"/><block var="CED Q8b MAZE"/><block var="CED Q8c MAZE"/><block var="CED Q8d MAZE"/></list></block></block></custom-block><block s="bubble"><block s="reportJoinWords"><list><l>Running the code on grid </l><block s="reportUnicodeAsLetter"><block s="reportDifference"><block s="reportVariadicSum"><list><block var="maze number"/><block s="reportUnicode"><l>A</l></block></list></block><l>1</l></block></block></list></block></block><custom-block s="REPEAT UNTIL %boolUE %cs"><custom-block s="$robot at goal?"></custom-block><script><custom-block s="IF %b %cs"><custom-block s="CAN_MOVE %s"><l>forward</l></custom-block><script><custom-block s="MOVE_FORWARD"></custom-block></script></custom-block><custom-block s="IF %b %cs"><custom-block s="CAN_MOVE %s"><l>right</l></custom-block><script><custom-block s="ROTATE_RIGHT"></custom-block></script></custom-block><custom-block s="IF %b %cs"><custom-block s="CAN_MOVE %s"><l>left</l></custom-block><script><custom-block s="ROTATE_LEFT"></custom-block></script></custom-block></script></custom-block><block s="doWait"><l>1</l></block></script></custom-block></script></block-definition><block-definition s="CED Q10" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="reset display"></custom-block><custom-block s="%upvar $arrowLeft %s"><l>onTime</l><block s="reportBoolean"><l><bool>false</bool></l></block></custom-block><custom-block s="%upvar $arrowLeft %s"><l>absent</l><block s="reportBoolean"><l><bool>false</bool></l></block></custom-block><custom-block s="IF %b %cs ELSE %cs"><block var="onTime"/><script><custom-block s="DISPLAY %s"><l>Hello</l></custom-block></script><script><custom-block s="IF %b %cs ELSE %cs"><block var="absent"/><script><custom-block s="DISPLAY %s"><l>Is anyone there?</l></custom-block></script><script><custom-block s="DISPLAY %s"><l>Better late than never.</l></custom-block></script></custom-block></script></custom-block><block s="bubble"><l>Answer: B</l></block></script></block-definition><block-definition s="CED Q14" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>delay</l></list></block><block s="doSetVar"><l>delay</l><l>4</l></block><custom-block s="Load Maze %s"><block var="CED Q14 MAZE"/></custom-block><block s="bubble"><l>Trying A...</l></block><custom-block s="MoveAndTurn %n %n"><l>1</l><l>2</l></custom-block><custom-block s="MoveAndTurn %n %n"><l>3</l><l>4</l></custom-block><custom-block s="MoveAndTurn %n %n"><l>0</l><l>2</l></custom-block><block s="doSayFor"><l>Trying A...nope!</l><block var="delay"/></block><custom-block s="Load Maze %s"><block var="CED Q14 MAZE"/></custom-block><block s="bubble"><l>Trying B...</l></block><custom-block s="MoveAndTurn %n %n"><l>2</l><l>1</l></custom-block><custom-block s="MoveAndTurn %n %n"><l>4</l><l>1</l></custom-block><custom-block s="MoveAndTurn %n %n"><l>2</l><l>0</l></custom-block><block s="doSayFor"><l>Trying B...nope!</l><block var="delay"/></block><custom-block s="Load Maze %s"><block var="CED Q14 MAZE"/></custom-block><block s="bubble"><l>Trying C...</l></block><custom-block s="MoveAndTurn %n %n"><l>2</l><l>1</l></custom-block><custom-block s="MoveAndTurn %n %n"><l>4</l><l>3</l></custom-block><custom-block s="MoveAndTurn %n %n"><l>2</l><l>0</l></custom-block><block s="doSayFor"><l>Trying C...yep!</l><block var="delay"/></block><custom-block s="Load Maze %s"><block var="CED Q14 MAZE"/></custom-block><block s="bubble"><l>Trying D...</l></block><custom-block s="MoveAndTurn %n %n"><l>3</l><l>1</l></custom-block><custom-block s="MoveAndTurn %n %n"><l>5</l><l>3</l></custom-block><custom-block s="MoveAndTurn %n %n"><l>3</l><l>0</l></custom-block><block s="doSayFor"><l>Trying D...nope!</l><block var="delay"/></block></script></block-definition><block-definition s="MoveAndTurn %&apos;numMoves&apos; %&apos;numTurns&apos;" type="command" category="motion"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><custom-block s="REPEAT %n TIMES %cs"><block var="numMoves"/><script><custom-block s="MOVE_FORWARD"></custom-block></script></custom-block><custom-block s="REPEAT %n TIMES %cs"><block var="numTurns"/><script><custom-block s="ROTATE_RIGHT"></custom-block></script></custom-block></script></block-definition><block-definition s="CED Q17" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="reset display"></custom-block><custom-block s="%upvar $arrowLeft %s"><l>i</l><l>0</l></custom-block><custom-block s="%upvar $arrowLeft %s"><l>sum</l><l>0</l></custom-block><block s="doSayFor"><l>Answer: D (infinite loop)</l><l>5</l></block><custom-block s="REPEAT UNTIL %boolUE %cs"><block s="reportEquals"><block var="i"/><l>4</l></block><script><custom-block s="%anyUE $arrowLeftOutline %s"><block var="i"/><l>1</l></custom-block><custom-block s="%anyUE $arrowLeftOutline %s"><block var="sum"/><block s="reportVariadicSum"><list><block var="sum"/><l>1</l></list></block></custom-block><custom-block s="%anyUE $arrowLeftOutline %s"><block var="i"/><block s="reportVariadicSum"><list><block var="i"/><l>1</l></list></block></custom-block></script></custom-block><custom-block s="DISPLAY %s"><block var="sum"/></custom-block></script></block-definition></blocks><stage name="Stage" width="480" height="480" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="true" hyperops="true" codify="false" inheritance="false" sublistIDs="false" id="2641"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAAAAXNSR0IArs4c6QAAIABJREFUeF7t3W2OZNdxdeGrkXXPjOLMukcmI/uDLBkkDBtyriD3U0D9ev0q4qwdGSvPvdXSP57n+dfjBwEEEEAAAQTeSeBf/yDgd/JWCwEEEEAAgW8ECNggIIAAAgggEBAg4AC6kggggAACCBCwGUAAAQQQQCAgQMABdCURQAABBBAgYDOAAAIIIIBAQICAA+hKIoAAAgggQMBmAAEEEEAAgYAAAQfQlUQAAQQQQICAzQACCCCAAAIBAQIOoCuJAAIIIIAAAZsBBBBAAAEEAgIEHEBXEgEEEEAAAQI2AwgggAACCAQECDiAriQCCCCAAAIEbAYQQAABBBAICBBwAF1JBBBAAAEECNgMIIAAAgggEBAg4AC6kggggAACCBCwGUAAAQQQQCAgQMABdCURQAABBBAgYDOAAAIIIIBAQICAA+hKIoAAAgggQMBmAAEEEEAAgYAAAQfQlUQAAQQQQICAzQACCCCAAAIBAQIOoCuJAAIIIIAAAZsBBBBAAAEEAgIEHEBXEgEEEEAAAQI2AwgggAACCAQECDiAriQCCCCAAAIEbAYQQAABBBAoCPzjeZ5/FYXVRAABBBBAYJkAAS+n7+wIIIAAAhkBAs7QK4wAAgggsEyAgJfTd3YEEEAAgYwAAWfoFUYAAQQQWCZAwMvpOzsCCCCAQEaAgDP0CiOAAAIILBMg4OX0nR0BBBBAICNAwBl6hRFAAAEElgkQ8HL6zo4AAgggkBEg4Ay9wggggAACywQIeDl9Z0cAAQQQyAgQcIZeYQQQQACBZQIE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5ErkJggg==</pentrails><costumes><list struct="atomic" id="2642"></list></costumes><sounds><list struct="atomic" id="2643"></list></sounds><variables></variables><blocks></blocks><scripts><script x="10" y="10"><block s="receiveInteraction"><l><option>clicked</option></l></block><block s="doBroadcast"><l>Toggle Cell State</l><list></list></block></script></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="-160" y="32" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="1" color="0,0,0,1" pen="middle" id="2654"><costumes><list id="2655"><item><ref mediaID="Sprite_cst_Arrow"></ref></item><item><ref mediaID="Sprite_cst_White"></ref></item><item><ref mediaID="Sprite_cst_Grey"></ref></item><item><ref mediaID="Sprite_cst_Black"></ref></item><item><ref mediaID="Sprite_cst_Cursor"></ref></item></list></costumes><sounds><list id="2656"><item><ref mediaID="Sprite_snd_Meow"></ref></item></list></sounds><blocks></blocks><variables></variables><scripts><comment x="14.333333333333334" y="3.3333333333333335" w="311" collapsed="false">Snap! translation of the AP CSP Reference Sheet (July 2015 edition).&#xD;Version 2016-05-10.</comment><comment x="14.333333333333334" y="61.833333333333336" w="146.5" collapsed="false">Assignment, Display, and Input</comment><script x="14.333333333333334" y="108.33333333333333"><custom-block s="%upvar $arrowLeft %s"><l>variable</l><l>BJC</l><comment w="204.5" collapsed="false">Solid for creating and assigning a variable,&#xD;Hollow for reassigning a value to a variable.&#xD;(Drag variable into slot left of hollow arrow)</comment></custom-block><custom-block s="%anyUE $arrowLeftOutline %s"><l></l><l></l></custom-block></script><script x="14.333333333333334" y="181.83333333333334"><custom-block s="DISPLAY %s"><l>Computer Science Principles</l><comment w="97.5" collapsed="false">wraps at column 20</comment></custom-block></script><script x="14.333333333333334" y="231.33333333333334"><custom-block s="INPUT"></custom-block></script><script x="14.333333333333334" y="253.33333333333334"><custom-block s="reset display"><comment w="216.5" collapsed="false">extra block, not on reference sheet. When switching from &quot;robot&quot; mode to &quot;display&quot; mode, it would probably be a good idea to click this.</comment></custom-block></script><script x="14.333333333333334" y="326.8333333333333"><custom-block s="newline"><comment w="243.00000000000009" collapsed="false">extra block, not on reference sheet. Prints a newline.</comment></custom-block></script><comment x="14.333333333333334" y="376.3333333333333" w="212" collapsed="false">Arithmetic Operators and Numeric Procedures</comment><script x="14.333333333333334" y="422.8333333333333"><block s="reportVariadicSum"><list><l></l><l></l></list></block></script><script x="14.333333333333334" y="448.3333333333333"><block s="reportDifference"><l></l><l></l></block></script><script x="14.333333333333334" y="473.8333333333333"><custom-block s="%n * %n"><l></l><l></l></custom-block></script><script x="14.333333333333334" y="499.3333333333333"><block s="reportQuotient"><l></l><l></l></block></script><script x="14.333333333333334" y="524.8333333333339"><custom-block s="%n MOD %n"><l></l><l></l></custom-block></script><script x="14.333333333333334" y="550.3333333333336"><custom-block s="RANDOM %n , %n"><l></l><l></l></custom-block></script><comment x="14.333333333333334" y="575.8333333333336" w="161" collapsed="false">Relational and Boolean Operators</comment><script x="14.333333333333334" y="622.3333333333336"><block s="reportEquals"><l></l><l></l></block></script><script x="14.333333333333334" y="647.8333333333336"><custom-block s="%s ≠ %s"><l></l><l></l></custom-block></script><script x="14.333333333333334" y="673.3333333333336"><block s="reportGreaterThan"><l></l><l></l></block></script><script x="14.333333333333334" y="698.8333333333336"><block s="reportLessThan"><l></l><l></l></block></script><script x="14.333333333333334" y="724.3333333333336"><custom-block s="%s ≥ %s"><l></l><l></l></custom-block></script><script x="14.333333333333334" y="749.8333333333336"><custom-block s="%s ≤ %s"><l></l><l></l></custom-block></script><script x="14.333333333333334" y="775.3333333333336"><custom-block s="NOT %b"><l/></custom-block></script><script x="14.333333333333334" y="798.8333333333336"><custom-block s="%b AND %b"><l/><l/></custom-block></script><script x="14.333333333333334" y="822.3333333333336"><custom-block s="%b OR %b"><l/><l/></custom-block></script><comment x="14.333333333333334" y="845.8333333333336" w="54.5" collapsed="false">Selection</comment><script x="14.333333333333334" y="892.3333333333336"><custom-block s="IF %b %cs"><l/><script></script></custom-block></script><script x="14.333333333333334" y="940.8333333333336"><custom-block s="IF %b %cs ELSE %cs"><l/><script></script><script></script></custom-block></script><comment x="14.333333333333334" y="1015.8333333333343" w="50" collapsed="false">Iteration</comment><script x="14.333333333333334" y="1062.3333333333342"><custom-block s="REPEAT %n TIMES %cs"><l></l><script></script></custom-block></script><script x="14.333333333333334" y="1112.8333333333342"><custom-block s="REPEAT UNTIL %boolUE %cs"><l/><script></script></custom-block></script><comment x="14.333333333333334" y="1161.3333333333337" w="81.5" collapsed="false">List Operations</comment><script x="14.333333333333334" y="1207.8333333333333"><custom-block s="%l %n"><l/><l></l></custom-block></script><script x="14.333333333333334" y="1233.3333333333337"><custom-block s="%l %n $arrowLeft %l %n"><l/><l></l><l/><l></l></custom-block></script><script x="14.333333333333334" y="1264.8333333333337"><custom-block s="%upvar $arrowLeft %mult%s"><l>data</l><list><l></l><l></l><l></l></list></custom-block></script><script x="14.333333333333334" y="1299.8333333333337"><custom-block s="FOR EACH %upvar IN %l %cs"><l>item</l><l/><script></script></custom-block></script><script x="14.333333333333334" y="1353.833333333334"><custom-block s="INSERT %l %n %s"><l/><l></l><l></l></custom-block></script><script x="14.333333333333334" y="1385.333333333334"><custom-block s="APPEND %l %s"><l/><l></l></custom-block></script><script x="14.333333333333334" y="1416.833333333334"><custom-block s="REMOVE %l %n"><l/><l></l></custom-block></script><script x="14.333333333333334" y="1448.333333333334"><custom-block s="LENGTH %l"><l/></custom-block></script><comment x="14.333333333333334" y="1471.833333333334" w="315.5" collapsed="false">Procedures are defined with the &quot;make a block...&quot; context menu. Right-click (on Macs control-click) on the Scripts background to get to it. There&apos;s also a &quot;Make a block&quot; button in the Variables tab. Procedures that return values should be a &quot;Reporter&quot; (or &quot;Predicate&quot;).&#xD;Procedures that don&apos;t return values should be a &quot;Command&quot;.</comment><comment x="14.333333333333334" y="1566.333333333334" w="311.5" collapsed="false">Robot &#xD;&#xD;Note that you can make your own mazes interactively! Click on the grid to toggle cell states between empty [white], goal [grey] and blocked [black]. You can also use the arrow keys to move the robot around, and down arrow says the status of CAN_MOVE around.&#xD;You can also convert a maze into a text description of it, allowing you to edit the maze offline, and load/save that way. MAZES is a global variable that has a few mazes stored this way we use in the demo.</comment><script x="14.333333333333334" y="1708.8333333333333"><custom-block s="MOVE_FORWARD"></custom-block></script><script x="14.333333333333334" y="1736.833333333334"><custom-block s="ROTATE_LEFT"></custom-block></script><script x="14.333333333333334" y="1764.833333333334"><custom-block s="ROTATE_RIGHT"></custom-block></script><script x="14.333333333333334" y="1792.833333333334"><custom-block s="CAN_MOVE %s"><l>forward</l></custom-block></script><comment x="14.333333333333334" y="1818.833333333334" w="307.5" collapsed="false">END OF SNAP! CODE TO MIRROR THE REFERENCE SHEET...</comment><comment x="14.333333333333334" y="1865.3333333333333" w="306.5" collapsed="false">These are &quot;hat blocks&quot; that let you move the robot around, test CAN_MOVE when you click on the four arrow keys, and respond when you interactively click on the grid.</comment><script x="14.333333333333334" y="1935.8333333333333"><block s="receiveKey"><l><option>up arrow</option></l><list></list></block><custom-block s="MOVE_FORWARD"></custom-block></script><script x="14.333333333333334" y="1997.3333333333328"><block s="receiveKey"><l><option>left arrow</option></l><list></list></block><custom-block s="ROTATE_LEFT"></custom-block></script><script x="14.333333333333334" y="2058.8333333333326"><block s="receiveKey"><l><option>right arrow</option></l><list></list></block><custom-block s="ROTATE_RIGHT"></custom-block></script><script x="14.333333333333334" y="2120.333333333332"><block s="receiveKey"><l><option>down arrow</option></l><list></list></block><block s="doSayFor"><block s="reportNewList"><list><block s="reportNewList"><list><l>forward?</l><custom-block s="CAN_MOVE %s"><l>forward</l></custom-block></list></block><block s="reportNewList"><list><l>right?</l><custom-block s="CAN_MOVE %s"><l>right</l></custom-block></list></block><block s="reportNewList"><list><l>left?</l><custom-block s="CAN_MOVE %s"><l>left</l></custom-block></list></block><block s="reportNewList"><list><l>backward?</l><custom-block s="CAN_MOVE %s"><l>backward</l></custom-block></list></block></list></block><l>3</l></block></script><script x="14.333333333333334" y="2277.8333333333326"><block s="receiveMessage"><l>Toggle Cell State</l><list></list></block><custom-block s="toggle cell state"></custom-block></script><comment x="14.333333333333334" y="2339.3333333333317" w="305" collapsed="false">General-purpose robot helper functions.</comment><script x="14.333333333333334" y="2385.833333333332"><block s="clear"><comment w="210.5" collapsed="false">These three blocks are used to reset the robot world. Clear the screen, draw a grid, and move the robot to the middle.</comment></block><custom-block s="$stage draw grid"></custom-block><custom-block s="$robot reset"></custom-block></script><script x="14.333333333333334" y="2459.333333333332"><custom-block s="$robot at goal?"><comment w="212.5" collapsed="false">Is the robot over a grey goal square?</comment></custom-block></script><script x="14.333333333333334" y="2508.833333333332"><custom-block s="$robot follow left wall until goal"><comment w="119.5" collapsed="false">The standard &quot;follow the left wall&quot; maze solver. </comment></custom-block></script><script x="14.333333333333334" y="2570.333333333332"><custom-block s="Load Maze %s"><block var="MAZE"/><comment w="178.5" collapsed="false">Load the maze from its text equivalent</comment></custom-block></script><script x="14.333333333333334" y="2619.8333333333317"><block s="doSetVar"><l>MAZE</l><custom-block s="Get Maze"></custom-block><comment w="135" collapsed="false">Get Maze returns the text equivalent of the maze.</comment></block></script><script x="14.333333333333334" y="2681.3333333333317"><block s="doAddToList"><block var="MAZE"/><block var="MAZES"/><comment w="144" collapsed="false">Add the maze to the collection</comment></block></script><script x="14.333333333333334" y="2730.8333333333317"><custom-block s="Load Maze %s"><block s="reportListItem"><l>4</l><block var="MAZES"/></block><comment w="81.5" collapsed="false">Load maze #3</comment></custom-block></script><comment x="14.333333333333334" y="2780.3333333333317" w="300" collapsed="false">This sets things in motion when the project starts, with a nice message displayed and then demos the maze-solving algorithm.</comment><script x="14.333333333333334" y="2838.8333333333317"><block s="receiveGo"></block><block s="clear"></block><custom-block s="reset display"></custom-block><custom-block s="DISPLAY %s"><l>This is a demo of</l></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>the CSP reference</l></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>sheet in Snap!</l></custom-block><custom-block s="newline"></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>We support DISPLAY</l></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>as well as robot</l></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>procedures.</l></custom-block><custom-block s="newline"></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>We&apos;ll now load some</l></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>mazes and follow</l></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>the left wall to the</l></custom-block><custom-block s="newline"></custom-block><custom-block s="DISPLAY %s"><l>goal (in grey).</l></custom-block><block s="doWait"><l>5</l></block><block s="doDeclareVariables"><list><l>maze num</l></list></block><block s="doSetVar"><l>maze num</l><l>1</l></block><block s="doForever"><script><block s="clear"></block><custom-block s="Load Maze %s"><block s="reportListItem"><block var="maze num"/><block var="MAZES"/></block></custom-block><custom-block s="$robot follow left wall until goal"></custom-block><block s="doSetVar"><l>maze num</l><block s="reportVariadicSum"><list><block s="reportModulus"><block var="maze num"/><block s="reportListAttribute"><l><option>length</option></l><block var="MAZES"/></block></block><l>1</l></list></block></block></script></block></script><comment x="14.333333333333334" y="3532.3333333333317" w="332.5" collapsed="false">What follows are Course and Exam Description sample coding questions</comment><script x="14.333333333333334" y="3578.8333333333317"><custom-block s="CED Q5"><comment w="210.5" collapsed="false">CED Q5: Where does the robot end?</comment></custom-block></script><script x="14.333333333333334" y="3628.3333333333335"><custom-block s="CED Q8"><comment w="214" collapsed="false">CED Q8: Which maze does the program NOT correctly move the robot to the gray square?&#xD;You need to click the red &quot;stop&quot; button,&#xD;since this runs forever.</comment></custom-block></script><script x="14.333333333333334" y="3713.833333333332"><custom-block s="CED Q10"><comment w="141" collapsed="false">CED Q10: What is displayed?</comment></custom-block></script><script x="14.333333333333334" y="3763.3333333333335"><custom-block s="CED Q14"><comment w="200" collapsed="false">CED Q14: Which code segments move the robot to the gray square?</comment></custom-block></script><script x="14.333333333333334" y="3824.833333333332"><custom-block s="CED Q17"><comment w="214" collapsed="false">CED Q8: What is displayed?&#xD;You need to click the red &quot;stop&quot; button&#xD;since this runs forever.</comment></custom-block></script></scripts></sprite><watcher scope="Sprite" s="getScale" style="normal" x="4.9800141059031375" y="4.9800141059027965" color="143,86,227" hidden="true"/><watcher scope="Sprite" s="xPosition" style="normal" x="4.9800141059031375" y="23.904068704336154" color="74,108,212" hidden="true"/><watcher scope="Sprite" s="yPosition" style="normal" x="4.9800141059031375" y="42.8281233027696" color="74,108,212" hidden="true"/><watcher scope="Sprite" s="getCostumeIdx" style="normal" x="4.9800141059031375" y="61.75217790120297" color="143,86,227" hidden="true"/><watcher s="xPosition" style="normal" x="4.809671571091712" y="4.809671571093261" color="74,108,212" hidden="true"/><watcher s="yPosition" style="normal" x="4.809671571091712" y="23.086424503181803" color="74,108,212" hidden="true"/><watcher var="MAZES" style="normal" x="4.809671571091712" y="41.36317743527047" color="243,118,29" extX="240" extY="210" hidden="true"/><watcher var="MAZE" style="normal" x="4.065317637472617" y="0" color="243,118,29" hidden="true"/><watcher var="CHARACTERS" style="normal" x="3.845518167122009" y="215.7672198908225" color="243,118,29" hidden="true"/><watcher scope="Sprite" s="direction" style="normal" x="6.425824652777919" y="6.425824652777713" color="74,108,212" hidden="true"/><watcher s="getScale" style="normal" x="8.635531135530982" y="8.635531135531146" color="143,86,227" hidden="true"/><watcher var="CED Q5 MAZE" style="normal" x="12.8125" y="12.812500000000007" color="243,118,29" hidden="true"/><watcher var="CED Q8b MAZE" style="normal" x="12.8125" y="566.3124974375" color="243,118,29" hidden="true"/><watcher var="CED Q8a MAZE" style="normal" x="16.65625" y="14.093752562499994" color="243,118,29" hidden="true"/><watcher var="CED Q8c MAZE" style="normal" x="12.8125" y="506.09374743750004" color="243,118,29" hidden="true"/><watcher var="CED Q8d MAZE" style="normal" x="15.375" y="442.03124743750004" color="243,118,29" hidden="true"/><watcher var="CED Q14 MAZE" style="normal" x="10" y="10" color="243,118,29" hidden="true"/></sprites></stage><variables><variable name="MAZES"><list struct="atomic" id="2937">&quot;***************&#xD;***************&#xD;**   ***G*** **&#xD;** * *** *** **&#xD;**   ***     ** &#xD;** ******* **** &#xD;** *** *** ****&#xD;** *** *** ****&#xD;**           **&#xD;****** ***** **&#xD;****** ***** **&#xD;****** ***** **&#xD;**&gt;      *** **&#xD;***************&#xD;***************&quot;,&quot;***************&#xD;***************&#xD;***         ***&#xD;***** *********&#xD;***** *********&#xD;***** *********&#xD;*G            *&#xD;*** *** *** * *&#xD;*** *** ***   *&#xD;*** *** ***** *&#xD;*         *** *&#xD;*** *** ***** *&#xD;*** *** ***&gt;  *&#xD;***************&#xD;***************&quot;,&quot;               &#xD;               &#xD;               &#xD;               &#xD;               &#xD;      ******   &#xD;      **G **   &#xD;      *^* **   &#xD;      * * **   &#xD;      *   G*   &#xD;      *G****   &#xD;      ******   &#xD;               &#xD;               &#xD;               &#xD;&quot;,&quot;               &#xD; ***  ***  *** &#xD; *    *    * * &#xD; *    ***  *** &#xD; *      *  *   &#xD; ***  ***  *   &#xD;               &#xD; * *  ***  * * &#xD; * *  * *  * * &#xD;  *   ***   *  &#xD;  *   * *   *  &#xD;  *   * *   *  &#xD; *****   ***** &#xD;     G*^*      &#xD;               &#xD;&quot;</list></variable><variable name="MAZE"><l>               &#xD; ***  ***  *** &#xD; *    *    * * &#xD; *    ***  *** &#xD; *      *  *   &#xD; ***  ***  *   &#xD;               &#xD; * *  ***  * * &#xD; * *  * *  * * &#xD;  *   ***   *  &#xD;  *   * *   *  &#xD;  *   * *   *  &#xD; *****   ***** &#xD;     G*^*      &#xD;               &#xD;</l></variable><variable name="CHARACTERS"><l>15</l></variable><variable name="CED Q5 MAZE"><l>               &#xD;               &#xD;               &#xD;               &#xD;    *******    &#xD;    *     *    &#xD;    *     *    &#xD;    *     *    &#xD;    *     *    &#xD;    *&gt;    *    &#xD;    *******    &#xD;               &#xD;               &#xD;               &#xD;               &#xD;</l></variable><variable name="CED Q8a MAZE"><l>               &#xD;               &#xD;               &#xD;               &#xD;     *****     &#xD;     *  G*     &#xD;     * ***     &#xD;     * ***     &#xD;     * ***     &#xD;     *  &lt;*     &#xD;     *****     &#xD;               &#xD;               &#xD;               &#xD;               &#xD;</l></variable><variable name="CED Q8b MAZE"><l>               &#xD;               &#xD;               &#xD;               &#xD;     *****     &#xD;     *G  *     &#xD;     *** *     &#xD;     *   *     &#xD;     * ***     &#xD;     *  &lt;*     &#xD;     *****     &#xD;               &#xD;               &#xD;               &#xD;               &#xD;</l></variable><variable name="CED Q8c MAZE"><l>               &#xD;               &#xD;               &#xD;               &#xD;     *****     &#xD;     *  G*     &#xD;     ** **     &#xD;     *  **     &#xD;     * ***     &#xD;     *  &lt;*     &#xD;     *****     &#xD;               &#xD;               &#xD;               &#xD;               &#xD;</l></variable><variable name="CED Q8d MAZE"><l>               &#xD;               &#xD;               &#xD;               &#xD;     *****     &#xD;     *G  *     &#xD;     ** **     &#xD;     *  **     &#xD;     * ***     &#xD;     *  &lt;*     &#xD;     *****     &#xD;               &#xD;               &#xD;               &#xD;               &#xD;</l></variable><variable name="CED Q14 MAZE"><l>               &#xD;               &#xD;               &#xD;               &#xD;    *******    &#xD;    *****G*    &#xD;    ***** *    &#xD;    *     *    &#xD;    * *****    &#xD;    *^*****    &#xD;    *******    &#xD;               &#xD;               &#xD;               &#xD;               &#xD;</l></variable></variables></scene></scenes></project><media name="CSPrinciplesReferenceSheetSnap!" app="Snap! 7, https://snap.berkeley.edu" version="2"><costume name="Arrow" center-x="16" center-y="16" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAd1JREFUWEftV03LAVEYPYNYKDaysPYxrKSwUTJiiq1CshD2ZC8/wEr5MfILrGUlStmQjbBBru7UOxmMr/HxLuZZztw7z7nnOefchgFAADD4TZFfNRaPqwJQGVAZEBjI5/Ok3+/D5/MhHo8jk8l8jRmxkdvtJi6XCwzDYDqdQqfTIRAIgOd5JBKJjwGSfDgUChGLxSLJxMPhgNFoBKvVinA4jEaj8VYwko91u13SarWg1Wplg3m322E4HMLhcIDjONRqNUWALjY3m03S6/VAG90rjUaD1WqF2WwGlmURi8VQLpefAnR1cbFYJMvlEvv9/h4GyXsKaLFYYL1ew+v1PiRoWbQcxxGTyfQUgPPF54KmDksmk5KeN+nyeDzE6XQqAnG6mQp6MplAr9cjl8uhUqkwXwdAHWU0GpHNZlGtVuUBRCIRYjabFZ3+dATBYFDQxHmmXGWgUCgQqu5XRbjZbEQRptPpmyy/xYbz+Vy0YalUet2GnU6HtNttUDvJ1Xa7xXg8ht1uRzQaFeaoZE4PRTFNPpvNJkRxvV5X1PDCqn8PWJYlNM1o0cvIYDCACodeRjzPv7XpKQjxOh4MBvD7/UKcplKpjzWUZUDJHJXs/dpJ5UCqAFQG/gUDP/09PwKTyrAf9VGAZQAAAABJRU5ErkJggg==" mediaID="Sprite_cst_Arrow"/><costume name="White" center-x="16" center-y="16" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAD9JREFUWEft18ENACAMw0Bn/6GDyhCUh71Ao/s1QIGwU+/htjPieZkcoIACCiiggAIKKKCAAgoooMAPAqvv+QH4dHwf3IAdCgAAAABJRU5ErkJggg==" mediaID="Sprite_cst_White"/><costume name="Grey" center-x="16" center-y="16" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAADBJREFUWEft0EERAAAIwzCmfNJBBp9UQS9pu/NYDBAgQIAAAQIECBAgQIAAAQLfAgdh60+hOMXpZQAAAABJRU5ErkJggg==" mediaID="Sprite_cst_Grey"/><costume name="Black" center-x="16" center-y="16" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAC9JREFUWEft0EERAAAMwjDwL3qTwSdV0EuTXIbVAAECBAgQIECAAAECBAgQILAWeLAnIAG6gLhJAAAAAElFTkSuQmCC" mediaID="Sprite_cst_Black"/><costume name="Cursor" center-x="5" center-y="19.5" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAnCAYAAAA2ANlVAAAAAXNSR0IArs4c6QAAAUZJREFUOE/t1cEr5kEcx/HXs7K1Nyec+Afc9kCLllDY5ORiOShRVi7k4LK7pdQim63NaQtxc+HgLv6G9Q9sIrlIWCV9NU/9ejz726PD7u8yNfOe+U4z7/n8ChjDd/Rh39PvI0YLqX8Gi5hNbRH/gRH0FsEYaMUBpvANmxhCDc6yYMDvsIbDNPE1TmOgFIy+JUzjPbaLeygH9qRVG3CZB7alVVtwkwd24isacfUfLPXlGY8ndAs3o70rvZlKvElX1o4PmMQ1fuG4aE8VdlCLCtTjJ6qxii9ZzV7iN0KzcDJKX+AF7sv5GKWX0ZxKP26zHPiM5/jvll5B09/e9duMZrd5ATCAddThPA/cwiDmsPAncD6FZyRwTIjVd0vt+YTI6/AwgjQMj+TtDzg0e4U9dCCi7ijzfoexEX4GOIFxdOOkzF+hC58fACkrXqYRh8KIAAAAAElFTkSuQmCC" mediaID="Sprite_cst_Cursor"/><sound name="Meow" sound="http://snap.berkeley.edu/snapsource/Sounds/Meow.wav" mediaID="Sprite_snd_Meow"/></media></snapdata>