<snapdata remixID="8434162"><project name="Espiral-2" app="Snap! 5.1, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAADGklEQVR4nO3YwUuTcRzH8f6K6NAg+iO8iOBdBKHw1rH8B5q0U9J/4CFFsLxGByXGQFvLbLXcU+tXY/Nx08kQ8TaKhhAt+HRqsiZpB/0Mer/gywODPc/zhTeM/S4JMLrkfgH8304MsNlsqlAonMtEUaRWq3XRe2JA9QWYTqe1s7Nz5mk0GmoUMso/eqA3j/8+lRdPtbu7q1qtprW1Nce+GDA9AeZyOVWr1X+aei3W61uX9fXu1VPnWzKher3e/e7e3p5rbwyIngBXV1cVQlAIQePj46rX61pYWNDs7KySyaSGhoaUSqU0NzenmZkZhRBU/hT0+fYVtacTak8n9LP5QUfzN9T5uKzOVrb7+e+pVCrdZ4QQXHtjQPQEmE6nVSwWVSwWNTY2pmq1qtHRUQ0PD2tiYkIjIyOanJzU1NSUEomEyuWyQul9T4BH8zfViV/qR/REna1cX4AhhO4zSqWSa28MiL4A8/l8dw4ODro/l/l8XnEca3NzU3Eca39/X1EUqfjurcp3jgNsp66rfe/a8fWPAKMo6t5/e3vbtTcGRN+fkMXFReVyuTPPxsYrtZ4/1Pdn90+dL8Vlra+vK5vNamlpybAuBs2JxzDlclkrKyvnMplMRoeHhxe9JwYUB9GwIkBYESCsCBBWBAgrAoQVAcKKAGFFgLAiQFgRIKwIEFYECCsChBUBwooAYUWAsCJAWBEgrAgQVgQIKwKEFQHCigBhRYCwIkBYESCsCBBWBAgrAoQVAcKKAGFFgLAiQFgRIKwIEFYECCsChBUBwooAYUWAsCJAWBEgrAgQVgQIKwKEFQHCigBhRYCwIkBYESCsCBBWBAgrAoQVAcKKAGFFgLAiQFgRIKwIEFYECCsChBUBwooAYUWAsCJAWBEgrAgQVgQIKwKEFQHCigBhRYCwIkBYESCsCBBWBAgrAoQVAcKKAGFFgLAiQFgRIKwIEFYECCsChBUBwooAYUWAsCJAWBEgrAgQVgQIKwKEFQHCigBhRYCwIkBYESCsCBBWBAgrAoQVAcKKAGFFgLAiQFgRIKwIEFYECCsChNUviH4d/rOxYMMAAAAASUVORK5CYII=</thumbnail><stage name="Palco" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" volume="100" pan="0" lines="round" ternary="false" codify="false" inheritance="true" 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="Ator" idx="1" x="45.226214937897566" y="-7.1449644340181635" heading="210" scale="0.5" volume="100" pan="0" rotation="0" draggable="true" hidden="true" costume="0" color="0,69.207,150.45,1" pen="tip" id="8"><costumes><list struct="atomic" id="9"></list></costumes><sounds><list struct="atomic" id="10"></list></sounds><blocks></blocks><variables></variables><scripts><script x="260" y="466"><block s="clear"></block></script><script x="56" y="36"><block s="receiveGo"></block><block s="doSetVar"><l>Linha</l><l>50</l></block><block s="doSetVar"><l>Graus</l><l>30</l></block><block s="hide"></block><block s="down"></block><block s="doFor"><l>Graus</l><l>30</l><l>360</l><script><block s="gotoXY"><l>0</l><l>0</l></block><block s="clear"></block><block s="doFor"><l>i</l><l>1</l><block var="Linha"/><script><block s="forward"><block var="i"/></block><block s="turn"><block var="Graus"/></block></script></block><block s="doFor"><l>i</l><block var="Linha"/><l>1</l><script><block s="forward"><block var="i"/></block><block s="turn"><block var="Graus"/></block></script></block></script></block></script><script x="393" y="281"><block s="hide"></block></script><script x="407" y="405"><block s="show"></block></script></scripts></sprite><watcher scope="Ator" s="getScale" style="normal" x="10.677777777777806" y="55.52444871555552" color="143,86,227" hidden="true"/><watcher scope="Palco" s="reportMouseX" style="normal" x="10.677777777777806" y="100.37111965333344" color="4,148,220" hidden="true"/><watcher scope="Palco" s="reportMouseY" style="normal" x="10.677777777777806" y="122.79445512222236" color="4,148,220" hidden="true"/><watcher var="Graus" style="normal" x="5.338888888888846" y="3.2033354688888807" color="243,118,29" hidden="true"/><watcher scope="Ator" s="direction" style="normal" x="10.677777777777806" y="145.21779059111125" color="74,108,212" hidden="true"/><watcher scope="Ator" s="yPosition" style="normal" x="10.677777777777806" y="167.64112606000015" color="74,108,212" hidden="true"/><watcher var="Linha" style="normal" x="11.117859725235007" y="34.465367371800426" color="243,118,29" hidden="true"/><watcher scope="Ator" s="xPosition" style="normal" x="11.9193798449611" y="11.919379844961242" color="74,108,212" hidden="true"/><watcher scope="Ator" s="getCostumeIdx" style="normal" x="11.9193798449611" y="36.95007990325581" color="143,86,227" hidden="true"/><watcher scope="Ator" s="reportShown" style="normal" x="11.9193798449611" y="61.98077996155038" color="143,86,227" hidden="true"/><watcher scope="Palco" s="getTempo" style="normal" x="11.9193798449611" y="90.5872939733333" color="207,74,217" hidden="true"/><watcher scope="Ator" s="getVolume" style="normal" x="11.9193798449611" y="115.61799403162786" color="207,74,217" hidden="true"/><watcher scope="Ator" s="getPan" style="normal" x="11.9193798449611" y="140.6486940899224" color="207,74,217" hidden="true"/><watcher scope="Ator" s="getPenDown" style="normal" x="11.9193798449611" y="165.679394148217" color="0,161,120" hidden="true"/><watcher scope="Palco" s="getLastMessage" style="normal" x="11.9193798449611" y="194.28590815999993" color="230,168,34" hidden="true"/><watcher scope="Palco" s="getLastAnswer" style="normal" x="11.9193798449611" y="219.3166082182945" color="4,148,220" hidden="true"/><watcher scope="Palco" s="getTimer" style="normal" x="11.9193798449611" y="244.34730827658916" color="4,148,220" hidden="true"/><watcher var="Linha" style="normal" x="9.313571945046533" y="7.5406991765147495" color="243,118,29"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="$flash analyze %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="149" collapsed="false">returns a frequency analysis of the argument list, represented as a two-column table, where the first column contains the unique values and the second column their occurrences</comment><header></header><code></code><translations>pt:$flash as frequências dos itens de _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>list</l></list><l>var dict = new Map(),&#xD;    result = [],&#xD;    data = list.asArray(),&#xD;    len = data.length,&#xD;    i;&#xD;for (i = 0; i &lt; len; i += 1) {&#xD;    if (dict.has(data[i])) {&#xD;        dict.set(data[i], dict.get(data[i]) + 1);&#xD;    } else {&#xD;        dict.set(data[i], 1);&#xD;    }&#xD;}&#xD;dict.forEach(function (value, key) {&#xD;    result.push(new List([key, value]));&#xD;});&#xD;return new List(result);</l></block><list><block var="data"/></list></block></block></script></block-definition><block-definition s="$flash group %&apos;data&apos; by %&apos;fn&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o agrupamento dos itens de _ de acordo com _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>data</l><l>fn</l><l>proc</l></list><l>return proc.reportAtomicGroup(data, fn);</l></block><list><block var="data"/><block var="fn"/></list></block></block></script></block-definition><block-definition s="$flash sort %&apos;data&apos; by %&apos;fn&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:uma ordenação de _ com critério _&#xD;</translations><inputs><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>data</l><l>fn</l><l>proc</l></list><l>return proc.reportAtomicSort(data, fn);</l></block><list><block var="data"/><block var="fn"/></list></block></block></script></block-definition><block-definition s="histogram of %&apos;data&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o histograma de _ entre _ e _ com intervalo _&#xD;</translations><inputs><input type="%l"></input><input type="%n"></input><input type="%n"></input><input type="%n">1</input></inputs><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><custom-block s="$flash sort %l by %predRing"><custom-block s="$flash analyze %l"><block var="data"/></custom-block><block s="reifyPredicate"><autolambda><block s="reportLessThan"><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></block></autolambda><list></list></block></custom-block><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="floor"/><block var="ceiling"/><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><block var="interval"/></block></autolambda><list></list></block><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><l>0</l></list></block></autolambda><list></list></block></custom-block></block></script></block-definition><block-definition s="histogram of %&apos;data&apos; grouped by: %&apos;key&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o histograma de _ agrupado de acordo com _ entre _ e _ com passo _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%n"></input><input type="%n"></input><input type="%repRing"></input></inputs><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><custom-block s="$flash sort %l by %predRing"><custom-block s="$flash group %l by %repRing"><block var="data"/><block var="key"/></custom-block><block s="reifyPredicate"><autolambda><block s="reportLessThan"><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></block></autolambda><list></list></block></custom-block><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="floor"/><block var="ceiling"/><block var="interval"/><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><l>0</l><block s="reportNewList"><list></list></block></list></block></autolambda><list></list></block></custom-block></block></script></block-definition><block-definition s="fill %&apos;data&apos; key: %&apos;key&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos; with: %&apos;generator&apos;" type="reporter" category="lists"><comment x="0" y="0" w="103" collapsed="false">add missing entries to a sorted list. Used for histograms</comment><header></header><code></code><translations>pt:os itens de _ com a chave _ entre _ e _ com passo _ completados por _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%n"></input><input type="%n"></input><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doIf"><block s="reportGreaterThan"><block var="floor"/><block var="ceiling"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="generator"/><list><block var="floor"/></list></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block var="data"/><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script></block><block s="doIf"><block s="reportLessThan"><block s="evaluate"><block var="key"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block var="floor"/></block><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block s="reportCDR"><block var="data"/></block><block var="key"/><block var="floor"/><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><block s="evaluate"><block var="key"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block var="floor"/></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block s="reportCDR"><block var="data"/></block><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="generator"/><list><block var="floor"/></list></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block var="data"/><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script></block-definition><block-definition s="pipe %&apos;value&apos; $arrowRight %&apos;pipe&apos;" type="reporter" category="control"><header></header><code></code><translations>pt:a aplicação a _ de _&#xD;</translations><inputs><input type="%s"></input><input type="%mult%repRing"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="pipe"/></block><script><block s="doReport"><block var="value"/></block></script></block><block s="doReport"><custom-block s="pipe %s $arrowRight %mult%repRing"><block s="evaluate"><block s="reportListItem"><l>1</l><block var="pipe"/></block><list><block var="value"/></list></block><block s="reportCDR"><block var="pipe"/></block></custom-block></block></script></block-definition><block-definition s="%&apos;text&apos; $arrowRight lower case" type="reporter" category="operators"><header></header><code></code><translations>pt:_ em minúsculas&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>txt</l></list><l>return txt.toLowerCase()</l></block><list><block var="text"/></list></block></block></script></block-definition><block-definition s="plot %&apos;data&apos; bars at x: %&apos;left&apos; y: %&apos;bottom&apos; width: %&apos;width&apos; height: %&apos;height&apos;" type="command" category="pen"><header></header><code></code><translations>pt:desenha gráfico de barras de _ em (x: _ , y: _ ) com largura _ e altura _&#xD;</translations><inputs><input type="%l"></input><input type="%n">-200</input><input type="%n">-100</input><input type="%n">400</input><input type="%n">200</input></inputs><script><block s="doDeclareVariables"><list><l>ratio</l><l>step</l><l>flat line ends</l><l>col</l><l>sorted</l><l>min</l></list></block><block s="doSetVar"><l>flat line ends</l><block s="evaluate"><block s="reportJSFunction"><list></list><l>var isFlat = SpriteMorph.prototype.useFlatLineEnds;&#xD;SpriteMorph.prototype.useFlatLineEnds = true;&#xD;return isFlat;</l></block><list></list></block></block><block s="doSetVar"><l>sorted</l><custom-block s="$flash sort %l by %predRing"><block var="data"/><block s="reifyPredicate"><autolambda><block s="reportGreaterThan"><l></l><l></l></block></autolambda><list></list></block></custom-block></block><block s="doIfElse"><block s="reportLessThan"><block s="reportListItem"><l><option>last</option></l><block var="sorted"/></block><l>0</l></block><script><block s="doSetVar"><l>min</l><block s="reportListItem"><l><option>last</option></l><block var="sorted"/></block></block></script><script><block s="doSetVar"><l>min</l><l>0</l></block></script></block><block s="doSetVar"><l>ratio</l><block s="reportQuotient"><block var="height"/><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="sorted"/></block><block var="min"/></block></block></block><block s="doSetVar"><l>step</l><block s="reportQuotient"><block var="width"/><block s="reportListLength"><block var="data"/></block></block></block><block s="doIfElse"><block s="reportGreaterThan"><block var="step"/><l>2</l></block><script><block s="doSetVar"><l>col</l><block s="reportDifference"><block var="step"/><l>1</l></block></block></script><script><block s="doSetVar"><l>col</l><block s="reportProduct"><block var="step"/><l>0.8</l></block></block></script></block><block s="gotoXY"><block var="left"/><block var="bottom"/></block><block s="setSize"><l>0.5</l></block><block s="down"></block><block s="changeXPosition"><block s="reportQuotient"><block var="step"/><l>2</l></block></block><block s="doWarp"><script><block s="doUntil"><block s="reportEquals"><block s="reportListLength"><block var="data"/></block><l>0</l></block><script><block s="setSize"><block var="col"/></block><block s="changeYPosition"><block s="reportProduct"><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="data"/></block><block var="min"/></block><block var="ratio"/></block></block><block s="setYPosition"><block var="bottom"/></block><block s="setSize"><l>0.5</l></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block><block s="doIfElse"><block s="reportGreaterThan"><block s="reportListLength"><block var="data"/></block><l>0</l></block><script><block s="changeXPosition"><block var="step"/></block></script><script><block s="changeXPosition"><block s="reportQuotient"><block var="step"/><l>2</l></block></block></script></block></script></block></script></block><block s="up"></block><block s="doRun"><block s="reportJSFunction"><list><l>flag</l></list><l>SpriteMorph.prototype.useFlatLineEnds = flag;</l></block><list><block var="flat line ends"/></list></block></script></block-definition></blocks><variables><variable name="Graus"><l>30</l></variable><variable name="Linha"><l>50</l></variable></variables></project><media name="Espiral-2" app="Snap! 5.1, http://snap.berkeley.edu" version="1"></media></snapdata>