<snapdata remixID="8967246"><project name="W14 prog quiz" app="Snap! 5.1, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAABRUlEQVR4nO3SMQEAAAiAMPuX1hgcbgk4mIXQ1AH8ZkBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJGVAUgYkZUBSBiRlQFIGJHX8f+V3XQoIUwAAAABJRU5ErkJggg==</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" volume="100" pan="0" lines="round" ternary="true" codify="false" inheritance="false" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAACtUlEQVR4nO3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+Bo3+AAF/RMkcAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Dot" idx="2" x="100" y="50" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" hidden="true" costume="1" color="80,80,80,1" pen="tip" id="8"><costumes><list id="9"><item><costume name="costume1" center-x="19.5" center-y="19.25" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAnCAYAAACMo1E1AAAHXUlEQVRYhcWYa4xcZRnHf3uZ7s7e5rI755z3nLPbC6ht/WCaNlBCUGJIwRgJIqEkRJFKNQEjwUvaDxpWjKUEY4QYEWICKAlmx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c4oxgtRXh4l/hstcJzfks/sQabuRjds5n/Y9FB3ZVvQIlUUiZEjTR8bUI23MNT2NYZSP0RmnkM5ryHFgaguxWGkdQRj/xNl/xXjvITM/JSh1G5k6m5k/Dp66ShtOy9S/JcK2UMdOdJ0169BN2xGNd7CQMsXUa1fZyixC538Hjr9MLLtW+j0TvLJ28k330DIRrK4BDRevCOvHLSaHuoIaSHA4hirUVxNnvWcYgOSdeTwGCVdWrXWfphL7CqKVFOkpqTDlmXv+389mxlRkuNw6gAAAABJRU5ErkJggg==" id="10"/></item></list></costumes><sounds><list struct="atomic" id="11"></list></sounds><blocks></blocks><variables></variables><scripts><script x="16.666666666666657" y="16.66666666666667"><block s="clear"></block><block s="up"></block><block s="gotoXY"><l>0</l><l>100</l></block></script><comment x="16.666666666666657" y="89" w="90" collapsed="false">Challenge question 1 is worth 3 pts</comment><comment x="16.666666666666657" y="185.66666666666663" w="90" collapsed="false">Challenge question 2 is worth 3 pts</comment><script x="16.666666666666657" y="249"><block s="hide"></block></script><script x="16.666666666666657" y="282.3333333333333"><block s="show"></block></script><script x="177.5" y="176.16666666666674"><custom-block s="Triangular number %s"><l>3</l></custom-block></script><script x="170" y="223.33333333333337"><custom-block s="Draw Triangular Number %s"><l></l></custom-block></script></scripts></sprite><sprite name="Prob 1 a-c" idx="1" x="125" y="-36.50635094610962" heading="90" scale="0.6" volume="100" pan="0" rotation="1" draggable="true" hidden="true" costume="1" color="66.29999999999994,0,255,1" pen="tip" id="26"><costumes><list id="27"><item><costume name="Untitled" center-x="54.5" center-y="97" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAADCCAYAAABDskxtAAAHqklEQVR4nO2dS27jRhCGy4uJY/Mh5AQ+hLe5R27gta8QIEAukV0AbSdHmBPEB8hekdSiBRiIAyMwOgtZcrPZfKofVdT/Ab2YgSDR/FTVxX6J6FJR9ECq0LQrNFXZMvXlgCHs8nfaLTTtFpqq7C315YAhbHN9krbNderLAUOANIGY0nbloSl6SH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NK1vfopwxWAUXdIQZUyBNIFAmkAgTRiugWFI88yYUt5mT3e0Kf86PIMdW/5frVL8+7ufMbqfmj3d0bb80ynIbtvb3zC6H5O2CLQldAkjwug+C1bf/9oQpPKvpK4fT+2Zfjy9Hv0ZE/Z05xTkAtIEMlSa1le0W2jS+oeziiPgAUSaQCBNIJAmEEgTCKQxx6z6tP5CWl/VH64Xr7Snu4RXCAahrh+tpQar3mc7wIBN+eQc4gKMaQx9lXtEmwTsxT2INgHY0YYVWUI4DjQzTo3/A/V+Ehwu8mY+AAAAAElFTkSuQmCC" id="28"/></item></list></costumes><sounds><list struct="atomic" id="29"></list></sounds><blocks></blocks><variables></variables><scripts><script x="16.666666666666657" y="10"><custom-block s="%s factorial"><l>5</l><comment w="172" collapsed="false">A few minutes ago, we used a script variable when creating a factorial block.... We needed a script variable to accumulate the result as we multiplied the numbers.</comment></custom-block></script><comment x="16.666666666666657" y="112.16666666666669" w="90" collapsed="false">the entire quiz is worth 16 pts</comment><comment x="16.666666666666657" y="277.6666666666667" w="90" collapsed="false">To work on the challenge problem click on the green dot sprite.</comment><script x="26.66666666666663" y="195.50000000000006"><custom-block s="sum from %s to %s"><l></l><l></l><comment w="90" collapsed="false">Quiz problem 1a.  Create the rest of this block using a script variable.  &#xD;4 pts</comment></custom-block></script><script x="16.66666666666663" y="375.16666666666674"><custom-block s="v2 raise %s to the power of %s"><l></l><l></l><comment w="90" collapsed="false">Quiz problem 1b.  Create the rest of the block using a script variable.&#xD;4 pts</comment></custom-block></script><script x="431" y="105"><custom-block s="Draw triangle %n"><l>100</l></custom-block></script><script x="963.0000030000003" y="759.600005"><block var="a"/></script><script x="667.0000009999999" y="702.600001"><block s="gotoXY"><block s="reportDifference"><l>0</l><block s="reportProduct"><block var="triangle side length"/><block s="reportQuotient"><block var="a"/><l>2</l></block></block></block><block s="reportSum"><l>100</l><block s="reportProduct"><l>-1</l><block s="reportProduct"><block var="a"/><block var="triangle side length"/></block></block></block></block><block s="doIf"><block s="reportEquals"><block s="yPosition"></block><block s="reportProduct"><block s="reportQuotient"><block var="a"/><l>2</l></block><block var="triangle side length"/></block></block><script><block s="changeXPosition"><block s="reportQuotient"><block var="triangle side length"/><l>2</l></block></block><block s="changeYPosition"><block var="triangle side length"/></block></script></block><block s="setHeading"><l>90</l></block><block s="doRepeat"><block var="a"/><script><custom-block s="Draw triangle %n"><block var="triangle side length"/></custom-block><block s="forward"><block var="triangle side length"/></block></script></block></script><script x="478" y="51"><block s="clear"></block></script><script x="69" y="470"><block s="doRepeat"><l>3</l><script><block s="forward"><block var="side length"/></block><block s="turnLeft"><l>120</l></block></script></block></script><script x="58" y="598.8"><block s="doRepeat"><block var="number"/><script><custom-block s="Draw triangle %n"><block var="side length"/></custom-block><block s="forward"><block var="side length"/></block></script></block></script><script x="80.000001" y="704.800001"><block s="doIf"><block s="reportEquals"><block s="yPosition"></block><block s="reportProduct"><block s="reportQuotient"><block var="number of rows"/><l>2</l></block><block var="triangle side length"/></block></block><script></script></block><block s="setHeading"><l>90</l></block></script><script x="636" y="110"><custom-block s="Draw Row of Triangles %s , %s"><l>3</l><l>50</l></custom-block></script><script x="546" y="173"><custom-block s="Draw Pyramid %s , %s"><l>5</l><l>50</l></custom-block></script></scripts></sprite><watcher var="hight" style="normal" x="10" y="10" color="243,118,29" hidden="true"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="v2 raise %&apos;base&apos; to the power of %&apos;exponent&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>product</l></list></block><block s="doIfElse"><block s="reportLessThan"><l>1</l><block var="exponent"/></block><script><block s="doSetVar"><l>product</l><block var="base"/></block><block s="doFor"><l>i</l><l>1</l><block s="reportDifference"><block var="exponent"/><l>1</l></block><script><block s="doSetVar"><l>product</l><block s="reportProduct"><block var="product"/><block var="base"/></block></block></script></block><block s="doReport"><block var="product"/></block></script><script><block s="doReport"><block var="base"/></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></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="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>1</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>2</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="words"/></block><block s="reportCDR"><block s="reportCDR"><block var="words"/></block></block></block></custom-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><scripts><script x="229.000003" y="196.77778077777774"><block s="reportJoinWords"><list><l></l><l></l></list></block></script></scripts></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="Sum of the numbers 1 to %&apos;end&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="%&apos;num&apos; factorial" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>factorial</l></list></block><block s="doSetVar"><l>factorial</l><l>1</l></block><block s="doIfElse"><block s="reportEquals"><block var="num"/><l>0</l></block><script><block s="doReport"><l>1</l></block></script><script><custom-block s="for %upvar = %n to %n %cs"><l>i</l><block var="num"/><l>1</l><script><block s="doSetVar"><l>factorial</l><block s="reportProduct"><block var="i"/><block var="factorial"/></block></block></script></custom-block><block s="doReport"><block var="factorial"/></block></script></block></script></block-definition><block-definition s="sum from %&apos;num1&apos; to %&apos;num2&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>sum</l><l>b</l></list></block><block s="doSetVar"><l>sum</l><block var="num1"/></block><block s="doSetVar"><l>b</l><l>1</l></block><block s="doFor"><l>i</l><block var="num1"/><block s="reportDifference"><block var="num2"/><l>1</l></block><script><block s="doSetVar"><l>sum</l><block s="reportSum"><block var="sum"/><block s="reportSum"><block var="num1"/><block var="b"/></block></block></block><block s="doSetVar"><l>b</l><block s="reportSum"><block var="b"/><l>1</l></block></block></script></block><block s="doReport"><block var="sum"/></block></script><scripts><script x="297.9834004375" y="70.000002"><block var="sum"/></script><script x="339.5498076875" y="177.000004"><block var="num1"/></script></scripts></block-definition><block-definition s="Triangular number %&apos;n&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="clear"></block><block s="doRepeat"><block var="n"/><script><block s="doStamp"></block><block s="forward"><l>50</l></block></script></block><block s="gotoXY"><l>0</l><l>50</l></block><block s="doRepeat"><block s="reportDifference"><block var="n"/><l>1</l></block><script><block s="doStamp"></block><block s="forward"><l>50</l></block></script></block><block s="doReport"><custom-block s="Sum of the numbers 1 to %s"><block var="n"/></custom-block></block></script></block-definition><block-definition s="Draw Triangular Number %&apos;n&apos;" type="command" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><scripts><script x="21.999999999999982" y="182"><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>0</l><block var="n"/><script><block s="doRepeat"><custom-block s="Triangular number %s"><block var="i"/></custom-block><script><block s="gotoXY"><block s="reportSum"><l>0</l><block s="reportProduct"><l>20</l><block var="i"/></block></block><block s="reportDifference"><l>100</l><block s="reportProduct"><l>35</l><block var="i"/></block></block></block><block s="doStamp"></block><block s="gotoXY"><block s="reportDifference"><l>0</l><block s="reportProduct"><l>20</l><block var="i"/></block></block><block s="reportDifference"><l>100</l><block s="reportProduct"><l>35</l><block var="i"/></block></block></block><block s="doStamp"></block></script></block></script></custom-block><block s="gotoXY"><l>0</l><block s="reportDifference"><l>30</l><block s="reportProduct"><l>35</l><block var="i"/></block></block></block><block s="doStamp"></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>0</l><block s="reportDifference"><block var="n"/><l>2</l></block><script><block s="doRepeat"><custom-block s="Triangular number %s"><block var="i"/></custom-block><script><block s="gotoXY"><block s="reportSum"><l>0</l><block s="reportProduct"><l>20</l><block var="i"/></block></block><block s="reportDifference"><l>30</l><block s="reportProduct"><l>35</l><block var="i"/></block></block></block><block s="doStamp"></block><block s="gotoXY"><block s="reportDifference"><l>0</l><block s="reportProduct"><l>20</l><block var="i"/></block></block><block s="reportDifference"><l>30</l><block s="reportProduct"><l>35</l><block var="i"/></block></block></block><block s="doStamp"></block></script></block></script></custom-block></script></scripts></block-definition><block-definition s="Draw triangle %&apos;side length&apos;" type="command" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doRepeat"><l>3</l><script><block s="down"></block><block s="forward"><block var="side length"/></block><block s="turnLeft"><l>120</l></block></script></block><block s="up"></block></script></block-definition><block-definition s="Draw Row of Triangles %&apos;number&apos; , %&apos;side length&apos;" type="command" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>hight</l><block s="reportMonadic"><l><option>sqrt</option></l><block s="reportDifference"><block s="reportPower"><block var="side length"/><l>2</l></block><block s="reportPower"><block s="reportQuotient"><block var="side length"/><l>2</l></block><l>2</l></block></block></block></block><block s="gotoXY"><block s="reportDifference"><l>0</l><block s="reportProduct"><block var="side length"/><block s="reportQuotient"><block var="number"/><l>2</l></block></block></block><block s="reportSum"><l>180</l><block s="reportProduct"><l>-1</l><block s="reportProduct"><block var="hight"/><block var="number"/></block></block></block></block><block s="doIf"><block s="reportEquals"><block s="yPosition"></block><block s="reportProduct"><block s="reportQuotient"><block var="number"/><l>2</l></block><block var="side length"/></block></block><script><block s="changeXPosition"><block s="reportQuotient"><block var="side length"/><l>2</l></block></block><block s="changeYPosition"><block var="side length"/></block></script></block><block s="setHeading"><l>90</l></block><block s="doRepeat"><block var="number"/><script><custom-block s="Draw triangle %n"><block var="side length"/></custom-block><block s="forward"><block var="side length"/></block></script></block></script></block-definition><block-definition s="Draw Pyramid %&apos;number of rows&apos; , %&apos;triangle side length&apos;" type="command" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><l>0</l></block><block s="doUntil"><block s="reportEquals"><block s="reportSum"><block var="number of rows"/><l>1</l></block><block var="a"/></block><script><custom-block s="Draw Row of Triangles %s , %s"><block var="a"/><block var="triangle side length"/></custom-block><block s="doChangeVar"><l>a</l><l>1</l></block></script></block></script></block-definition></blocks><variables><variable name="hight"><l>43.30127018922193</l></variable></variables></project><media name="W14 prog quiz" app="Snap! 5.1, http://snap.berkeley.edu" version="1"></media></snapdata>