<snapdata remixID="13671609"><project name="U1L3p3 The For Block (answer file)" app="Snap! 11.0.0, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAACIElEQVR4Xu3SMQ0AAAzDsJU/6cHI4xKoFHlnCoQFFn67VuAAhCAtAGCa3zmADKQFAEzzOweQgbQAgGl+5wAykBYAMM3vHEAG0gIApvmdA8hAWgDANL9zABlICwCY5ncOIANpAQDT/M4BZCAtAGCa3zmADKQFAEzzOweQgbQAgGl+5wAykBYAMM3vHEAG0gIApvmdA8hAWgDANL9zABlICwCY5ncOIANpAQDT/M4BZCAtAGCa3zmADKQFAEzzOweQgbQAgGl+5wAykBYAMM3vHEAG0gIApvmdA8hAWgDANL9zABlICwCY5ncOIANpAQDT/M4BZCAtAGCa3zmADKQFAEzzOweQgbQAgGl+5wAykBYAMM3vHEAG0gIApvmdA8hAWgDANL9zABlICwCY5ncOIANpAQDT/M4BZCAtAGCa3zmADKQFAEzzOweQgbQAgGl+5wAykBYAMM3vHEAG0gIApvmdA8hAWgDANL9zABlICwCY5ncOIANpAQDT/M4BZCAtAGCa3zmADKQFAEzzOweQgbQAgGl+5wAykBYAMM3vHEAG0gIApvmdA8hAWgDANL9zABlICwCY5ncOIANpAQDT/M4BZCAtAGCa3zmADKQFAEzzOweQgbQAgGl+5wAykBYAMM3vHEAG0gIApvmdA8hAWgDANL9zABlICwCY5ncOIANpAQDT/M4BZCAtAGCa3zmADKQFAEzzOweQgbQAgGl+5w8zDAB5EXMqlAAAAABJRU5ErkJggg==</thumbnail><scenes select="1"><scene name="U1L3p3 The For Block (answer file)"><notes></notes><hidden></hidden><headers></headers><code></code><blocks><block-definition s="housekeeping %&apos;x position&apos; %&apos;y position&apos; %&apos;direction&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="clear"></block><block s="up"></block><block s="gotoXY"><block var="x position"/><block var="y position"/></block><block s="setHeading"><block var="direction"/></block><block s="down"></block></script></block-definition><block-definition s="draw polygon %&apos;sides&apos; %&apos;size&apos;" type="command" category="motion"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doRepeat"><block var="sides"/><script><block s="forward"><block var="size"/></block><block s="turn"><block s="reportQuotient"><l>360</l><block var="sides"/></block></block></script></block></script></block-definition><block-definition s="label %&apos;text&apos; of size %&apos;size&apos;" type="command" category="pen"><comment x="0" y="0" w="90" collapsed="false">LABEL will stamp text on the stage at the given font size. The direction of the text is the direction the sprite is facing, and color will match the pen color.</comment><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;    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="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><list></list></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><list></list></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="reportVariadicEquals"><list><block var="data"/><block s="reportNewList"><list></list></block></list></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><list></list></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><list></list></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="reportVariadicGreaterThan"><list><block var="start"/><block var="end"/></list></block><script><block s="doSetVar"><l>step</l><l>-1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportVariadicLessThan"><list><block var="i"/><block var="end"/></list></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="reportVariadicGreaterThan"><list><block var="i"/><block var="end"/></list></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><list></list></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><list></list></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="draw squiral %&apos;input1&apos; %&apos;input2&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="down"></block><custom-block s="for %upvar = %n to %n %cs"><l>length</l><block var="input1"/><block var="input2"/><script><block s="forward"><block s="reportVariadicProduct"><list><l>2</l><block var="length"/></list></block></block><block s="turn"><l>90</l></block></script><comment w="193" collapsed="false">Have the students been taught to click on the index variable to change it?</comment></custom-block></script></block-definition><block-definition s="draw smooth spiral" type="command" category="pen"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="for %upvar = %n to %n %cs"><l>length</l><l>1</l><l>400</l><script><block s="forward"><block s="reportQuotient"><block var="length"/><l>15</l></block></block><block s="turn"><l>15</l></block></script><comment w="193" collapsed="false">400 was arbitrary.  Programmers might give SMOOTH SPIRAL a paramter for how many times to do the FOR loop to get different size spirals.</comment></custom-block></script><scripts><comment x="59" y="185.19999999999993" w="210" collapsed="false">Meta: Possible questions for students:&#xD;&#xD;1. Is this solution actually a smooth spiral?&#xD;2. What about it isn&apos;t as smooth as it could be?&#xD;3. Experiment: Make this even smoother.</comment></scripts></block-definition><block-definition s="nest squares %&apos;number of squares&apos; %&apos;initial side length&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><block var="number of squares"/><script><custom-block s="draw square %s"><block s="reportVariadicProduct"><list><block var="i"/><block var="initial side length"/></list></block></custom-block></script></custom-block></script></block-definition><block-definition s="draw concentric squares %&apos;number of squares&apos; %&apos;initial side length&apos; %&apos;separation&apos;" type="command" category="pen"><comment x="0" y="0" w="297" collapsed="false">Center of all squares will be (0, 0).  If (0, 0) is not desired, then add parameters to DRAW CONCENTRIC SQUARES and use those.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="up"></block><block s="gotoXY"><block s="reportQuotient"><block s="reportDifference"><l>0</l><block var="initial side length"/></block><l>2</l></block><block s="reportQuotient"><block var="initial side length"/><l>2</l></block><comment w="249" collapsed="false">Move to upper left corner of the square to be drawn.</comment></block><block s="down"></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><block var="number of squares"/><script><block s="down"></block><custom-block s="draw polygon %s %s"><l>4</l><block s="reportVariadicSum"><list><block var="initial side length"/><block s="reportVariadicProduct"><list><l>2</l><block s="reportVariadicProduct"><list><block s="reportDifference"><block var="i"/><l>1</l></block><block var="separation"/></list></block></list></block></list><comment w="198" collapsed="false">The length of a square is the initial side length plus the amount of separation between squares to the left of the last drawn square plus the amount of separation on the right.&#xD;&#xD;i-1 is needed because i starts at zero and the first square drawn should have the initial side length.</comment></block></custom-block><block s="up"></block><block s="changeXPosition"><block s="reportDifference"><l></l><block var="separation"/></block></block><block s="changeYPosition"><block var="separation"/><comment w="105" collapsed="false">Changer upper left corner for the next square to be drawn.</comment></block></script></custom-block></script></block-definition><block-definition s="count by %&apos;n&apos; from %&apos;a&apos; to %&apos;b&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><custom-block s="for %upvar = %n to %n %cs"><l>i</l><block var="a"/><block var="b"/><script><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><block s="reportDifference"><block var="i"/><block var="a"/></block><block s="reportQuotient"><block s="reportDifference"><block var="b"/><block var="a"/></block><block var="n"/></block></list></block><script><block s="doStopThis"><l><option>this script</option></l></block></script><script><block s="doSayFor"><block s="reportVariadicSum"><list><block var="a"/><block s="reportVariadicProduct"><list><block var="n"/><block s="reportDifference"><block var="i"/><block var="a"/></block></list></block></list></block><l>.5</l><comment w="268.6666666666667" collapsed="false">The first number to be said must be a.  Since i starts out equal to a, n*(i-a) = n*0 = 0 on the first pass and a is said.  On subsequent passes through the loop, an additional n will be added to the number being said.</comment></block></script><comment w="280" collapsed="false">(b-a)/n is the number of times COUNT BY should be performed.  Since the FOR loop increases i by 1, i-a gives us tells us what number of times we have already been through the loop.  If we are still supposed to be counting, the SAY block will be performed.  Otherwise, the script is stopped.</comment></block></script></custom-block></script></block-definition><block-definition s="draw square %&apos;size&apos;" type="command" category="motion"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doRepeat"><l>4</l><script><block s="forward"><block var="size"/></block><block s="turn"><l>90</l></block></script></block></script></block-definition></blocks><primitives></primitives><stage name="Stage" width="480" height="360" 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="731"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="732"></list></costumes><sounds><list struct="atomic" id="733"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="-144.99999999999977" y="145.0000000000003" heading="90.00000000000034" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="2,0,224,1" pen="tip" id="738"><costumes><list struct="atomic" id="739"></list></costumes><sounds><list struct="atomic" id="740"></list></sounds><blocks></blocks><variables></variables><scripts><script x="18.181818181818187" y="18.181818181818187"><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><l>15</l><script><block s="doSayFor"><block s="reportVariadicProduct"><list><l>2</l><block var="i"/></list></block><l>.5</l></block></script><comment w="205" collapsed="false">For You To Do #1</comment></custom-block></script><comment x="18.181818181818187" y="93.63636363636385" w="90" collapsed="false">Problem 3</comment><script x="18.181818181818187" y="177.27272727272748"><custom-block s="housekeeping %s %s %s"><l>0</l><l>0</l><l>90</l></custom-block><custom-block s="draw squiral %s %s"><l>1</l><l>100</l><comment w="192" collapsed="false">While there was nothing in the assignment that told the student to write a block called SQUIRAL, it helps keep things organized!</comment></custom-block></script><script x="18.181818181818187" y="278.1818181818187"><custom-block s="for %upvar = %n to %n %cs"><l>length</l><block var="input1"/><block var="input2"/><script><block s="forward"><block s="reportVariadicProduct"><list><l>2</l><block var="length"/></list></block></block><block s="turn"><l>90</l></block></script><comment w="256.3636363636363" collapsed="false">This is the script inside the SQUIRAL block. It will not run by itself and is here only to show the block&apos;s definition.</comment></custom-block></script><comment x="18.181818181818187" y="377.2727272727275" w="80" collapsed="false">Problem 7</comment><script x="18.181818181818187" y="460.90909090909065"><custom-block s="housekeeping %s %s %s"><l>0</l><l>0</l><l>90</l></custom-block><custom-block s="draw smooth spiral"></custom-block></script><script x="18.181818181818187" y="516.0909090909084"><custom-block s="for %upvar = %n to %n %cs"><l>length</l><l>1</l><l>400</l><script><block s="forward"><block s="reportQuotient"><block var="length"/><l>20</l></block></block><block s="turn"><l>20</l></block></script><comment w="359.3636363636363" collapsed="false">Script of SMOOTH SPIRAL.  &#xD;400 was arbitrary.  Programmers might give SMOOTH SPIRAL a parameter for how many times to do the FOR loop to get different size spirals. The 20 is also arbitrary. 15 or 10 or 30 or 27 would work as well. The idea is to have small turns. A turn of 45 would begin to be visibly &quot;pointy&quot; rather than smooth.</comment></custom-block></script><comment x="18.181818181818187" y="619.999999999999" w="355" collapsed="true">nest squares (NUMBER OF SQUARES) (INITIAL SIDE LENGTH)</comment><script x="18.181818181818187" y="650.9090909090897"><custom-block s="housekeeping %s %s %s"><l>-100</l><l>100</l><l>90</l><comment w="418.8181818181818" collapsed="false">Problem 8:&#xD;&#xD;In this sample solution, NEST SQUARES has two parameters:&#xD;&#xD;* Number of squares to draw&#xD;* Side length of the first square (which will be multiplied by the index variable in a FOR block)&#xD;&#xD;The first of these is the one required by the problem statement.</comment></custom-block><custom-block s="nest squares %s %s"><l>20</l><l>10</l></custom-block></script><script x="18.181818181818187" y="791.1818181818171"><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><block var="number of squares"/><script><custom-block s="draw square %s"><block s="reportVariadicProduct"><list><block var="i"/><block var="initial side length"/></list></block></custom-block></script><comment w="199.09090909090907" collapsed="false">script of NEST SQUARES</comment></custom-block></script><script x="18.181818181818187" y="866.6363636363634"><block s="receiveKey"><l><option>a</option></l><list></list><comment w="424.5454545454545" collapsed="true">The hat blocks are not needed. They just allow starting these scripts from the keyboard.</comment></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>10</l><l>0</l><script><block s="doSayFor"><block s="reportVariadicProduct"><list><block var="i"/><l>10</l></list></block><l>.2</l></block></script><comment w="99" collapsed="true">Take it further A</comment></custom-block></script><script x="18.181818181818187" y="975.4545454545462"><block s="receiveKey"><l><option>b</option></l><list></list><comment w="101" collapsed="true">Take it further B</comment></block><custom-block s="housekeeping %s %s %s"><l>0</l><l>0</l><l>90</l></custom-block><custom-block s="draw concentric squares %s %s %s"><l>20</l><l>10</l><l>7</l></custom-block></script><script x="18.181818181818187" y="1066.7272727272748"><block s="receiveKey"><l><option>d</option></l><list></list><comment w="117.27272727272727" collapsed="true">Take it further D</comment></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>3</l><l>12</l><script><custom-block s="draw polygon %s %s"><block var="i"/><l>50</l></custom-block></script></custom-block></script><script x="18.181818181818187" y="1171.9090909090942"><block s="receiveKey"><l><option>e</option></l><list></list><comment w="107.27272727272727" collapsed="true">Take it further E</comment></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>314</l><l>14</l><script><block s="doSayFor"><block s="reportQuotient"><block var="i"/><l>100</l></block><l>.1</l></block></script></custom-block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>14</l><l>314</l><script><block s="doSayFor"><block s="reportQuotient"><block var="i"/><l>100</l></block><l>.1</l></block></script></custom-block></script><comment x="18.181818181818187" y="146.36363636363654" w="201" collapsed="true">draw squiral (INPUT1) (INPUT2)</comment><comment x="18.181818181818187" y="429.9999999999998" w="154" collapsed="true">draw smooth spiral</comment></scripts></sprite></sprites></stage><variables></variables></scene></scenes></project><media name="U1L3p3 The For Block (answer file)" app="Snap! 11.0.0, https://snap.berkeley.edu" version="2"></media></snapdata>