<snapdata remixID="11251625"><project name="U5L3-TimingAlgorithms" app="Snap! 7, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAADMZJREFUeF7tnXlwFMcVxr/VLSQuCxDmkgFxQyVcBkSBuUJRpCgwwpIDRThs2a6AcTiCsBKgzBUDMdgk4Y8AxVXiMDg2BAgQc98QIQ4BFR1cUkFxI1ih1bG7qfdWs+wKpF2JXfXCvP5H7E73vO5vfszs9Hzz2mC1Wq2QIgooUsAgACpSXsKyAgKggKBUAQFQqfwSXAAUBpQqIAAqlV+CC4DCgFIFBECl8ktwAVAYUKqAAKhUfgkuAAoDShUQAJXKL8EFQGFAqQICoFL5JbgAKAwoVUAAVCq/BBcAhQGlCgiASuWX4AKgMKBUAQFQqfwSXAAUBpQqIAAqlV+CC4DCgFIFBECl8ktwAVAYUKqAAKhUfgkuAAoDShUQAJXKL8EFQGFAqQICoFL5JbgAKAwoVUAAVCq/BBcAhQGlCgiASuWX4AKgMKBUAQFQqfwSXAAUBpQqIAAqlV+CC4DCgFIFBECl8ktwAVAYUKqAAKhUfgkuAAoDShUQAJXKL8EFQGFAqQICoFL5JbgAKAwoVUAAVCq/BBcAhQGlCgiASuWX4AKgMKBUAQFQqfwSXAAUBpQq8FIAd+7cibZt28JgMCjtnCeCFxQUIC0tDbGxsZ7YnezDwwq8AGB6ejqsVivDV9bf0KAAmL/pjWqBHu6Nh3dngAGPPtvH43jw4AFiYmI8HEF296oKOAG4bds2NG/e3GmfZ8+exZgxY3Dx4kX791aTEU23xCFsziXkzWqH4BGL4Fe7MQzV66E4bReC+n+B/H98iNBPNsGY2ARhSaeRt+BdhC+8yZ/DF2TBmNScv6diNT3FsyX9EdBpOELiv3Vq69jGcv8616e6FLNg63SnvtrrlsShjddH77LXCQ0NfWF8ryqgtH81BZwATEpKsl+qzp07h8GDB+Po0aOIi4uDxWLBlStXkJ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VaO+RJGVkoQBtQrIa5lq9dd9dAFQ9wioFUAAVKu/7qMLgLpHQK0AAqBa/XUfXQDUPQJqBRAA1eqv++gCoO4RUCuAAKhWf91HFwB1j4BaAQRAtfrrProAqHsE1AogAKrVX/fRBUDdI6BWAAFQrf66jy4A6h4BtQIIgGr11330/wN4uWYC+v3WZwAAAABJRU5ErkJggg==</thumbnail><scenes select="1"><scene name="U5L3-TimingAlgorithms"><notes></notes><hidden></hidden><headers></headers><code></code><blocks><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="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 from %&apos;min&apos; through %&apos;max&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportGreaterThan"><block var="min"/><block var="max"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><script><block s="doReport"><block s="reportCONS"><block var="min"/><custom-block s="list from %s through %s"><block s="reportVariadicSum"><list><block var="min"/><l>1</l></list></block><block var="max"/></custom-block></block></block></script></block></script></block-definition><block-definition s="1000 numbers starting from %&apos;num&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doSetVar"><l>num list</l><block s="reportNewList"><list></list></block></block><block s="doRepeat"><l>1000</l><script><block s="doAddToList"><block var="num"/><block var="num list"/></block><block s="doChangeVar"><l>num</l><l>1</l></block></script></block><block s="doReport"><custom-block s="list from %s through %s"><block var="num"/><block var="num list"/></custom-block></block></script></block-definition><block-definition s="all %&apos;num&apos; digit numbers" type="reporter" category="lists"><comment x="0" y="0" w="90" collapsed="false">The list of 2-digit numbers goes from 10 to 99. There&apos;s a math operations block that can give you powers of 10. You don&apos;t need to include zero in 1 digit numbers.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportNumbers"><block s="reportMonadic"><l><option>10^</option></l><block s="reportDifference"><block var="num"/><l>1</l></block></block><block s="reportMonadic"><l><option>10^</option></l><block var="num"/></block></block></block></script></block-definition><block-definition s="time function %&apos;function&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input></inputs><script><block s="doDeclareVariables"><list><l>start time</l></list></block><block s="doSetVar"><l>start time</l><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><custom-block s="ignore %s"><block s="evaluate"><block var="function"/><list></list></block></custom-block><block s="doReport"><block s="reportDifference"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="start time"/></block></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="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.00000299999996" 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><custom-block s="ignore %s"><l>3</l></custom-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="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="%&apos;x&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block var="x"/></block></script></block-definition><block-definition s="numbers from %&apos;from&apos; to %&apos;to&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n">1</input><input type="%n">10</input></inputs><script><block s="doIf"><block s="reportGreaterThan"><block var="from"/><block var="to"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block var="from"/><custom-block s="numbers from %n to %n"><block s="reportVariadicSum"><list><block var="from"/><l>1</l></list></block><block var="to"/></custom-block></block></block></script></block-definition><block-definition s="map %&apos;func&apos; over %&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="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block var="data"/></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="func"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><custom-block s="map %repRing over %l"><block var="func"/><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script></block-definition><block-definition s="add numbers 1 to %&apos;max&apos; using for" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><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><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><block var="max"/><script><block s="doChangeVar"><l>a</l><block var="i"/></block></script></custom-block><block s="doReport"><block var="a"/></block></script></block-definition><block-definition s="add numbers 1 to %&apos;max&apos; using combine" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="combine with %repRing items of %l"><block s="reifyReporter"><autolambda><block s="reportVariadicSum"><list><l></l><l></l></list></block></autolambda><list></list></block><custom-block s="numbers from %n to %n"><l>1</l><block var="max"/></custom-block></custom-block></block></script></block-definition><block-definition s="add numbers 1 to %&apos;max&apos; using math trick" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportQuotient"><block s="reportVariadicProduct"><list><block var="max"/><block s="reportVariadicSum"><list><block var="max"/><l>1</l></list></block></list></block><l>2</l></block></block></script></block-definition><block-definition s="factorial of %&apos;num&apos;" type="reporter" category="operators"><comment x="0" y="0" w="144.5098039215686" collapsed="false">5 factorial -&gt; 5! = 5x4x3x2x1&#xD;You can choose to worry about zero/negative numbers or not </comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doSetVar"><l>fac list</l><l>0</l></block><block s="doSetVar"><l>fac num</l><block var="num"/></block><block s="doIfElse"><block s="reportLessThan"><block var="num"/><l>1</l></block><script><block s="doSayFor"><l>Pick a positive number.</l><l>2</l></block></script><script><block s="doChangeVar"><l>fac list</l><block s="reportVariadicProduct"><list><block var="fac num"/><block s="reportDifference"><block var="fac num"/><l>1</l></block></list></block></block><block s="doChangeVar"><l>fac num</l><l>-1</l></block><block s="doUntil"><block s="reportEquals"><block var="fac num"/><l>1</l></block><script><block s="doChangeVar"><l>fac num</l><l>-1</l></block><block s="doSetVar"><l>fac list</l><block s="reportVariadicProduct"><list><block var="fac list"/><block var="fac num"/></list></block></block></script></block></script></block><block s="doReport"><block var="fac list"/></block></script></block-definition><block-definition s="position of number %&apos;number&apos; in unsorted list %&apos;list&apos; of size %&apos;size&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>randomList</l><block s="reportNewList"><list></list></block></block><block s="doRepeat"><block var="size"/><script><block s="doAddToList"><block s="reportRandom"><l>1</l><l>100000</l></block><block var="randomList"/><comment w="90" collapsed="true">leave these numbers alone</comment></block></script></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block><script><block s="doIf"><block s="reportEquals"><block var="number"/><block s="reportListItem"><block var="i"/><block var="list"/></block></block><script><block s="doReport"><block var="i"/></block></script></block></script></custom-block><block s="doReport"><l>NIL</l></block></script></block-definition><block-definition s="position of number %&apos;num&apos; in sorted list %&apos;sorted&apos; of size %&apos;size&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l><l>b</l><l>c</l></list></block><block s="doSetVar"><l>sorted list</l><custom-block s="list from %s through %s"><l>1</l><block var="size"/></custom-block></block><block s="doSetVar"><l>a</l><l>1</l></block><block s="doSetVar"><l>b</l><block s="reportListAttribute"><l><option>length</option></l><block var="sorted"/></block></block><block s="doSetVar"><l>c</l><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><block s="reportVariadicSum"><list><block var="a"/><block var="b"/></list></block><l>2</l></block></block></block><block s="doUntil"><block s="reportEquals"><block var="num"/><block s="reportListItem"><block var="c"/><block var="sorted"/></block></block><script><block s="doIf"><block s="reportOr"><block s="reportEquals"><block var="c"/><block var="a"/></block><block s="reportEquals"><block var="c"/><block var="b"/></block></block><script><block s="doReport"><l>NIL</l></block></script></block><block s="doIfElse"><block s="reportLessThan"><block var="num"/><block s="reportListItem"><block var="c"/><block var="sorted"/></block></block><script><block s="doSetVar"><l>b</l><block var="c"/></block><block s="doSetVar"><l>c</l><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><block s="reportVariadicSum"><list><block var="a"/><block var="b"/></list></block><l>2</l></block></block></block></script><script><block s="doSetVar"><l>a</l><block var="c"/></block><block s="doSetVar"><l>c</l><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><block s="reportVariadicSum"><list><block var="a"/><block var="b"/></list></block><l>2</l></block></block></block></script></block></script></block><block s="doReport"><block var="c"/></block></script></block-definition><block-definition s="matching %&apos;num&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>list</l></list></block><block s="doSetVar"><l>list</l><custom-block s="list from %s through %s"><l>0</l><block var="num"/></custom-block></block><block s="doFor"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block><script><block s="doFor"><l>j</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block><script><block s="doIf"><block s="reportAnd"><block s="reportNot"><block s="reportEquals"><block var="i"/><block var="j"/></block></block><block s="reportEquals"><block s="reportListItem"><block var="i"/><block var="list"/></block><block s="reportListItem"><block var="j"/><block var="list"/></block></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><list><l>Match found at </l><block var="i"/><l> </l><block var="j"/></list></custom-block></block></script></block></script></block></script></block><block s="doReport"><l>No match found</l></block></script></block-definition><block-definition s="%&apos;n&apos; permutation %&apos;r&apos;" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>n-number</l><l>0</l></block><block s="doSetVar"><l>r-number</l><l>0</l></block><block s="doSetVar"><l>n-fac</l><block var="n"/></block><block s="doSetVar"><l>r-fac</l><block var="r"/></block><block s="doIfElse"><block s="reportLessThan"><block var="n"/><l>1</l></block><script><block s="doSayFor"><l>Pick a positive number.</l><l>2</l></block></script><script><block s="doChangeVar"><l>n-number</l><block s="reportVariadicProduct"><list><block var="n-fac"/><block s="reportDifference"><block var="n-fac"/><l>1</l></block></list></block></block><block s="doChangeVar"><l>n-fac</l><l>-1</l></block><block s="doUntil"><block s="reportEquals"><block var="n-fac"/><l>1</l></block><script><block s="doChangeVar"><l>n-fac</l><l>-1</l></block><block s="doSetVar"><l>n-number</l><block s="reportVariadicProduct"><list><block var="n-number"/><block var="n-fac"/></list></block></block></script></block></script></block><block s="doIfElse"><block s="reportLessThan"><block var="r"/><l>1</l></block><script><block s="doSayFor"><l>Pick a positive number.</l><l>2</l></block></script><script><block s="doChangeVar"><l>r-number</l><block s="reportVariadicProduct"><list><block var="r-fac"/><block s="reportDifference"><block var="r-fac"/><l>1</l></block></list></block></block><block s="doChangeVar"><l>r-fac</l><l>-1</l></block><block s="doUntil"><block s="reportEquals"><block var="r-fac"/><l>1</l></block><script><block s="doChangeVar"><l>r-fac</l><l>-1</l></block><block s="doSetVar"><l>r-number</l><block s="reportVariadicProduct"><list><block var="r-number"/><block var="r-fac"/></list></block></block></script></block></script></block><block s="doSetVar"><l>nPr</l><block s="reportDifference"><block var="n-number"/><block var="r-number"/></block></block><block s="doReport"><block var="nPr"/></block></script></block-definition><block-definition s="%&apos;n&apos; combination %&apos;r&apos;" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>nr number</l><l>0</l></block><block s="doSetVar"><l>n-number</l><l>0</l></block><block s="doSetVar"><l>r-number</l><l>0</l></block><block s="doSetVar"><l>n-fac</l><block var="n"/></block><block s="doSetVar"><l>r-fac</l><block var="r"/></block><block s="doIfElse"><block s="reportLessThan"><block var="n"/><l>1</l></block><script><block s="doSayFor"><l>Pick a positive number.</l><l>2</l></block></script><script><block s="doSetVar"><l>n-r</l><block s="reportDifference"><block var="n"/><block var="r"/></block></block><block s="doChangeVar"><l>nr number</l><block s="reportVariadicProduct"><list><block var="n-r"/><block s="reportDifference"><block var="n-r"/><l>1</l></block></list></block></block><block s="doChangeVar"><l>n-r</l><l>-1</l></block><block s="doUntil"><block s="reportEquals"><block var="n-r"/><l>1</l></block><script><block s="doChangeVar"><l>n-r</l><l>-1</l></block><block s="doSetVar"><l>nr number</l><block s="reportVariadicProduct"><list><block var="nr number"/><block var="n-r"/></list></block></block></script></block></script></block><block s="doIfElse"><block s="reportLessThan"><block var="r"/><l>1</l></block><script><block s="doSayFor"><l>Pick a positive number.</l><l>2</l></block></script><script><block s="doChangeVar"><l>r-number</l><block s="reportVariadicProduct"><list><block var="r-fac"/><block s="reportDifference"><block var="r-fac"/><l>1</l></block></list></block></block><block s="doChangeVar"><l>r-fac</l><l>-1</l></block><block s="doUntil"><block s="reportEquals"><block var="r-fac"/><l>1</l></block><script><block s="doChangeVar"><l>r-fac</l><l>-1</l></block><block s="doSetVar"><l>r-number</l><block s="reportVariadicProduct"><list><block var="r-number"/><block var="r-fac"/></list></block></block></script></block></script></block><block s="doIfElse"><block s="reportLessThan"><block var="n"/><l>1</l></block><script><block s="doSayFor"><l>Pick a positive number.</l><l>2</l></block></script><script><block s="doChangeVar"><l>n-number</l><block s="reportVariadicProduct"><list><block var="n-fac"/><block s="reportDifference"><block var="n-fac"/><l>1</l></block></list></block></block><block s="doChangeVar"><l>n-fac</l><l>-1</l></block><block s="doUntil"><block s="reportEquals"><block var="n-fac"/><l>1</l></block><script><block s="doChangeVar"><l>n-fac</l><l>-1</l></block><block s="doSetVar"><l>n-number</l><block s="reportVariadicProduct"><list><block var="n-number"/><block var="n-fac"/></list></block></block></script></block></script></block><block s="doSetVar"><l>nPr</l><block s="reportQuotient"><block var="n-number"/><block s="reportVariadicProduct"><list><block var="r-number"/><block var="nr number"/></list></block></block></block><block s="doReport"><block var="nPr"/></block></script><scripts><script x="313.986328125" y="558.0000000000005"><block s="reportDifference"><l></l><block var="r-number"/></block></script></scripts></block-definition></blocks><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="1336"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAADoVJREFUeF7t1cEJAAAIxDDdf2m3sJ+4wEEQuuMIECBAgACBd4F9XzRIgAABAgQIjAB7AgIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+g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7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+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+wECBAgQIBAICHCAbpIAAQIECByxcQFpoRMBzwAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="1337"></list></costumes><sounds><list struct="atomic" id="1338"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="0.41348850786107505" y="0.03274402548447597" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,1" pen="tip" id="1343"><costumes><list struct="atomic" id="1344"></list></costumes><sounds><list struct="atomic" id="1345"></list></sounds><blocks></blocks><variables></variables><scripts><script x="79.76683937823827" y="327.7979274611396"><custom-block s="add numbers 1 to %s using combine"><l></l></custom-block></script><comment x="21.398963730569932" y="10" w="315.38860103626945" collapsed="false">Use this &quot;list from x through y&quot; block to build the following blocks: </comment><script x="81.46185840349744" y="380.0418659952297"><custom-block s="matching %s"><l></l><comment w="208" collapsed="true">Just enter a number here - this algorithm is often used to see if there are duplicates. It has been modified to never have a duplicate so we can have accurate timings when run.</comment></custom-block></script><script x="26.281519861830702" y="415.12519932856355"><custom-block s="position of number %s in unsorted list %s of size %s"><l>0</l><block var="randomList"/><l>10</l><comment w="90" collapsed="true">keep the &quot;position of number&quot; = 0. Change the &quot;size&quot; and put in your chart.</comment></custom-block></script><script x="24.1442649598699" y="445.5173561913084"><custom-block s="position of number %s in sorted list %s of size %s"><l>0</l><block var="sorted list"/><l>10</l><comment w="90" collapsed="true">keep the &quot;position of number&quot; = 0. Change the &quot;size&quot; and put in your chart.</comment></custom-block></script><comment x="10" y="192.90155440414492" w="435.07772020725395" collapsed="false">Use the &quot;time function&quot; block to determine which algorithms (from above and below) can be executed in &quot;reasonable time&quot;.  &#xD;Also, run the &quot;time function&quot; multiple times on all the algorithms to determine if they are constant, linear, quadratic, cubic, exponential, or log time.</comment><comment x="14.145077720207269" y="103.26424870466317" w="495.18134715025906" collapsed="false">Also make a factorial block.</comment><script x="105.46185840349744" y="355.04186599522984"><custom-block s="add numbers 1 to %s using math trick"><l>200</l></custom-block></script><script x="442.87362310937976" y="38.51245423052396"><custom-block s="all %s digit numbers"><l>3</l></custom-block></script><script x="38.948186528497445" y="163.04186599522984"><custom-block s="time function %repRing"><block s="reifyReporter"><autolambda><custom-block s="%s combination %s"><l>100</l><l>50</l></custom-block></autolambda><list></list></block></custom-block></script><script x="61.461858403497445" y="73.04186599522987"><custom-block s="1000 numbers starting from %s"><l>4000</l></custom-block></script><script x="363.46185840349744" y="166.04186599522984"><custom-block s="factorial of %s"><l>5</l></custom-block></script><script x="521.4618584034974" y="281.04186599522984"><custom-block s="add numbers 1 to %s using for"><l>3</l></custom-block></script><script x="116.46185840349744" y="541.0418659952298"><custom-block s="%s permutation %s"><l>100</l><l>50</l></custom-block></script></scripts></sprite><watcher var="randomList" style="normal" x="-9.789647324482303" y="1.3958510487528386" color="243,118,29" hidden="true"/><watcher var="sorted list" style="normal" x="3.814343515213295" y="1.3414239654195015" color="243,118,29" hidden="true"/><watcher var="num list" style="normal" x="10" y="10" color="243,118,29" extX="80" extY="70" hidden="true"/><watcher var="fac list" style="normal" x="10" y="117.000002" color="243,118,29" hidden="true"/><watcher var="fac num" style="normal" x="10" y="138.000004" color="243,118,29" hidden="true"/><watcher var="nPr" style="normal" x="10" y="159.00000599999998" color="243,118,29"/><watcher var="n-fac" style="normal" x="10" y="201.00000999999997" color="243,118,29" hidden="true"/><watcher var="r-fac" style="normal" x="10" y="222.00001199999997" color="243,118,29" hidden="true"/><watcher var="r-number" style="normal" x="10" y="243.00001399999996" color="243,118,29"/><watcher var="n-number" style="normal" x="6" y="203.00000799999998" color="243,118,29"/><watcher var="n-r" style="normal" x="10" y="264.00001599999996" color="243,118,29"/><watcher var="nr number" style="normal" x="10" y="285.00001799999995" color="243,118,29"/></sprites></stage><variables><variable name="randomList"><list struct="atomic" id="1397">69931,18968,80478,56097,97962,79788,41179,99442,18772,44574,70376,28623,7638,26762,99243,43404,93185,49622,91248,81003,59859,28704,76744,33831,33223,33647,90137,2742,69465,84226,73400,88161,18986,64419,36071,12703,37973,22166,70690,94149,34705,13027,17943,31097,41882,82562,99117,68113,86359,54359,72922,87645,55508,41381,59196,39218,90642,15262,90716,58103,71421,40510,79816,35221,70199,33905,80417,32617,1336,22487,97503,22688,47023,46527,70566,14195,76087,28770,17797,93512,57039,81518,51853,79013,19091,52846,5628,81310,33092,50193,18488,95620,37896,15228,40230,3128,27778,10713,65042,70631,10758,11312,47590,22250,56536,21732,22309,14391,11377,21679,64253,90728,11222,56403,43138,16057,20322,74518,93510,1473,17108,62103,66099,16956,94348,24758,82178,45416,71234,66743,59743,31062,34090,77392,1598,63926,98404,25977,39962,60681,59224,39951,25136,51610,99047,26990,31441,85975,20848,11376,8752,87274,48737,40418,7716,60613,86399,71085,38089,47536,14306,11221,47313,82870,91708,9596,88503,57760,28839,49072,94089,62534,71496,8127,30492,29035,20006,88184,81740,52786,52693,90048,8270,2968,87391,94501,51672,41159,12857,22606,77723,75210,78872,4486,4168,54459,71720,56479,38498,17429,42266,39509,45897,79020,89369,37741,32127,42622,7125,40605,39526,49703,34662,56089,64271,48112,58153,38396,90345,31060,59610,47835,77323,90268,81402,8988,24456,99355,36790,99916,22642,90676,88725,70718,66619,20209,40272,80567,70461,87623,74065,89274,39119,6738,46655,99298,90493,51786,76707,81435,40568,34321,63991,17997,54133,20043,50313,77410,95719,29084,63605,92510,29300,12726,60013,41221,89397,1494,51671,98795,85199,25911,88657,27501,24283,97613,12728,34587,36544,6989,79472,62993,47618,76258,12706,34405,58033,90866,29477,97770,73729,59903,38187,44561,1971,43264,30929,30169,84877,95552,10623,77908,1435,84557,22007,99706,41722,74316,11936,86668,77455,74806,78853,923,53106,73772,48308,19480,64249,76929,93694,23705,92459,1660,47803,79517,84773,31712,19080,43583,18127,12721,61718,16301,30825,43066,37532,41475,51082,41185,48205,9426,78059,50259,30471,23092,85500,48888,34275,70453,70077,54501,17128,76043,49079,96585,34169,12511,85645,61161,3189,30105,15587,98646,71307,63930,10507,39827,89101,7688,53455,45130,73884,27778,89192,29479,92071,16926,47498,84412,96954,57147,98461,19264,8137,88200,83699,9452,45844,5140,31177,83677,1152,83600,69997,97785,17160,3317,25625,93504,40499,10008,6090,7480,76464,34675,26784,35124,72006,9855,27265,18118,78772,69094,99425,2877,87627,57344,9308,44694,58052,89567,62585,17758,50540,90943,76943,28748,3187,1119,26688,57422,7182,8012,39319,39651,16510,20052,98270,79135,42474,71676,99404,58847,74221,6879,27507,67024,41899,11199,12941,18231,23617,82270,8816,31046,12284,61576,68631,20139,91844,72662,51764,68528,7644,13931,78333,14071,64432,85500,28526,66671,31652,20991,37459,46601,93209,56716,94958,79522,63108,94344,17581,90557,8613,95800,2804,28559,41656,24610,49873,60580,16182,28511,51969,66284,9335,34063,27299,80880</list></variable><variable name="sorted list"><list struct="atomic" linked="linked" id="1398">1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100</list></variable><variable name="num list"><list struct="atomic" id="1399">4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4058,4059,4060,4061,4062,4063,4064,4065,4066,4067,4068,4069,4070,4071,4072,4073,4074,4075,4076,4077,4078,4079,4080,4081,4082,4083,4084,4085,4086,4087,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,4125,4126,4127,4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,4138,4139,4140,4141,4142,4143,4144,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,4158,4159,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4170,4171,4172,4173,4174,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4189,4190,4191,4192,4193,4194,4195,4196,4197,4198,4199,4200,4201,4202,4203,4204,4205,4206,4207,4208,4209,4210,4211,4212,4213,4214,4215,4216,4217,4218,4219,4220,4221,4222,4223,4224,4225,4226,4227,4228,4229,4230,4231,4232,4233,4234,4235,4236,4237,4238,4239,4240,4241,4242,4243,4244,4245,4246,4247,4248,4249,4250,4251,4252,4253,4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,4271,4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,4288,4289,4290,4291,4292,4293,4294,4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307,4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,4327,4328,4329,4330,4331,4332,4333,4334,4335,4336,4337,4338,4339,4340,4341,4342,4343,4344,4345,4346,4347,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,4358,4359,4360,4361,4362,4363,4364,4365,4366,4367,4368,4369,4370,4371,4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,4417,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,4443,4444,4445,4446,4447,4448,4449,4450,4451,4452,4453,4454,4455,4456,4457,4458,4459,4460,4461,4462,4463,4464,4465,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,4477,4478,4479,4480,4481,4482,4483,4484,4485,4486,4487,4488,4489,4490,4491,4492,4493,4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,4519,4520,4521,4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,4536,4537,4538,4539,4540,4541,4542,4543,4544,4545,4546,4547,4548,4549,4550,4551,4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,4568,4569,4570,4571,4572,4573,4574,4575,4576,4577,4578,4579,4580,4581,4582,4583,4584,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,4612,4613,4614,4615,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,4643,4644,4645,4646,4647,4648,4649,4650,4651,4652,4653,4654,4655,4656,4657,4658,4659,4660,4661,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,4683,4684,4685,4686,4687,4688,4689,4690,4691,4692,4693,4694,4695,4696,4697,4698,4699,4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,4712,4713,4714,4715,4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,4732,4733,4734,4735,4736,4737,4738,4739,4740,4741,4742,4743,4744,4745,4746,4747,4748,4749,4750,4751,4752,4753,4754,4755,4756,4757,4758,4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,4769,4770,4771,4772,4773,4774,4775,4776,4777,4778,4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,4789,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4801,4802,4803,4804,4805,4806,4807,4808,4809,4810,4811,4812,4813,4814,4815,4816,4817,4818,4819,4820,4821,4822,4823,4824,4825,4826,4827,4828,4829,4830,4831,4832,4833,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,4848,4849,4850,4851,4852,4853,4854,4855,4856,4857,4858,4859,4860,4861,4862,4863,4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874,4875,4876,4877,4878,4879,4880,4881,4882,4883,4884,4885,4886,4887,4888,4889,4890,4891,4892,4893,4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,4910,4911,4912,4913,4914,4915,4916,4917,4918,4919,4920,4921,4922,4923,4924,4925,4926,4927,4928,4929,4930,4931,4932,4933,4934,4935,4936,4937,4938,4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953,4954,4955,4956,4957,4958,4959,4960,4961,4962,4963,4964,4965,4966,4967,4968,4969,4970,4971,4972,4973,4974,4975,4976,4977,4978,4979,4980,4981,4982,4983,4984,4985,4986,4987,4988,4989,4990,4991,4992,4993,4994,4995,4996,4997,4998,4999</list></variable><variable name="fac list"><l>0</l></variable><variable name="fac num"><l>-2963</l></variable><variable name="nPr"><l>1.0089134454556424e+29</l></variable><variable name="n-number"><l>9.332621544394418e+157</l></variable><variable name="n-fac"><l>1</l></variable><variable name="r-fac"><l>1</l></variable><variable name="r-number"><l>3.0414093201713376e+64</l></variable><variable name="n-r"><l>1</l></variable><variable name="nr number"><l>3.0414093201713376e+64</l></variable></variables></scene></scenes></project><media name="U5L3-TimingAlgorithms" app="Snap! 7, https://snap.berkeley.edu" version="2"></media></snapdata>