<snapdata remixID="10766773"><project name="U2L4-MathLibrary" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAABrVJREFUeF7tnX9olHUcx9/nrdvcPOfEoh9Ubk7/qEF4LU0RERXhpgUqS0Tqj5HhMKUlphgjRZqJMoZaVCshNFQuTdxS9I9iWtpKd7RhwRpt/bFqSrTyx/R28sTzmOfGbnbc57l97rnn/fwjY8/n8/5+X9/Xvs89d/icxzAMAzxIQImAhwIqkWesRYACUgRVAnEFbGlpQVNT021DPR4MvEqn4mczZ/bs2QgEAqowGD7yBIYIePLkSUyaNCnuSA7v2YLxHSfgHWXfQPMKA3h6zXtWw/b2dpSVldnXnJ3SnsAgAZubm+H3+60d785ON/Df7pq5mPGIz/ZJ/frSiVheJBLB1KlTbc9gw/QkMEjA6upqLF261BppOBxGMBhEb28venp6MHbsWPxVG8S0h30YvfIA+uqXI3ftcVzfVYbcDV/j+vZZ8C1YB+/jpfD4H4Anxw/jxhVcr52HrMAS+Ga9bJ2bt+k7XKuZDt+CKkRO1VpZHcuPxaRvaGiAOQ4e7iAwSMC6ujrMnDnTkqG1tdW6HHZ3d2PixIno6urC1d3PY87OM5Zc12qmWSL2XwghZ1kdoi1HEP35NHxzVsO4cgnewmkwojdh9P4ek9D4+w+MfuUgbv3yLfq/P4hoy+cADFxcEortgObrz8rKSnfQ5ywH3wWbO535Omy4o//DcmsHtPsIL/o01rKkpAQFBQV2R7BfmhIYchNSX1+PoqKiuK8BzZ2wqLDQ1qlcunwZbW1tVp65y1ZUVNjan83Sm8Cw7wOO9AckpoA83EeAb0S7b83TasYUMK2Ww32DoYDuW/O0mjEFTKvlcN9gKKD71jytZkwB02o53DcYRwj4+qpq9B8OIueFU9jx7mb3rVIGz9gRApr8Z+WuxYy+N2NL0TmmAcv25qO8vDyDlyfzp+YYAc2lWF3wDXJ7i+OsioFm/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qgSoICq+BlOAemAKgEKqIqf4RSQDqgSoICq+BlOAemAKgEKqIqf4RSQDqgSoICq+BlOAemAKgEKqIqf4UME3LYpC489+Ynoq+qJlQQSJRB3B+w4e/c/Lu/am4c1G8IJf1V9osE8jwRMAsNeggdKeAdV9FYW9uwvxZ4PzpEeCdhCgALagpFNkiXAS3Cy5FhnCwHehNiCkU2SJcC3YZIlxzpbCFBAWzCySbIEKGCy5FhnCwEKaAtGNkmWAAVMlhzrbCFAAW3ByCbJEvgX2eZKxjiiGd8AAAAASUVORK5CYII=</thumbnail><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="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAADoVJREFUeF7t1cEJAAAIxDDdf2m3sJ+4wEEQuuMIECBAgACBd4F9XzRIgAABAgQIjAB7AgIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+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+wECBAgQIBAICHCAbpIAAQIECByxcQFpoRMBzwAAAABJRU5ErkJggg==</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="Operators" idx="2" x="0" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,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="20" y="20"><block s="reportModulus"><l>15</l><l>3</l><comment w="219" collapsed="false">Reports the remainder from a division operation</comment></block></script><script x="20" y="77"><custom-block s="is %n divisible by %n ?"><l>21</l><l>7</l></custom-block></script><script x="20" y="110"><custom-block s="is %n divisible by %n ?"><l>532</l><l>4</l></custom-block></script><script x="20" y="143"><custom-block s="even? %n"><l>32</l></custom-block></script><script x="20" y="176.00000000000003"><custom-block s="even? %n"><l>17</l></custom-block></script><script x="20" y="209.00000000000003"><custom-block s="odd? %n"><l>5</l></custom-block></script><script x="20" y="242.00000000000003"><custom-block s="odd? %n"><l>4</l></custom-block></script><script x="20" y="275"><block s="reportGreaterThan"><block s="reportModulus"><l>12</l><l>2</l></block><block s="reportModulus"><l>11</l><l>2</l></block></block></script><script x="20" y="312"><custom-block s="integer? %n"><l>7</l></custom-block></script><script x="20" y="345"><custom-block s="integer? %n"><l>8.1</l></custom-block></script><script x="20" y="378"><custom-block s="%s ≤ %s"><l>5</l><l>3</l></custom-block></script><script x="20" y="411"><custom-block s="%s ≥ %s"><l>5</l><l>6</l></custom-block></script><script x="20" y="444"><custom-block s="%s ≠ %s"><l>6</l><l>6</l></custom-block></script><script x="20" y="477"><custom-block s="is %s between %s and %s ?"><l>2</l><l>4</l><l>6</l></custom-block></script><script x="20" y="510"><custom-block s="number of divisors %n"><l>80000</l></custom-block></script><script x="20" y="543"><custom-block s="number of divisors %n"><l></l></custom-block></script><script x="20" y="576"><custom-block s="divisors of %n"><l>1000</l></custom-block></script></scripts></sprite><sprite name="Primes" idx="1" x="-87" y="121" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="116.025,0,232.05,1" pen="tip" id="63"><costumes><list struct="atomic" id="64"></list></costumes><sounds><list struct="atomic" id="65"></list></sounds><blocks></blocks><variables></variables><scripts><script x="20" y="20"><custom-block s="number of divisors %n"><l>17</l></custom-block></script><script x="20" y="53"><custom-block s="divisors of %n"><l>13</l></custom-block></script><script x="20" y="86"><custom-block s="is %n a prime number?"><l>61</l></custom-block></script><script x="20" y="119"><custom-block s="find all prime numbers in the first %n numbers"><l>1000</l></custom-block></script><comment x="218" y="31.00000000000003" w="90" collapsed="false">Abstraction Everywhere - all procedures</comment><comment x="20" y="152" w="305" collapsed="false">API:&#xD;Procedure - Number of Divisors&#xD;Parameter - Input: Integer (number), Output: Integer (number)&#xD;Purpose - Count the number of divisors of a particular number, nad return that value</comment></scripts></sprite><sprite name="Reporters" idx="3" x="-198" y="-153" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="219.29999999999998,197.36999999999998,0,1" pen="tip" id="77"><costumes><list struct="atomic" id="78"></list></costumes><sounds><list struct="atomic" id="79"></list></sounds><blocks></blocks><variables></variables><scripts><script x="20" y="20"><custom-block s="sum from %n to %n"><l>1</l><l>1000</l></custom-block></script><script x="20" y="53"><block s="reportCombine"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l></list></block><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block></block></script><script x="20" y="96"><custom-block s="maximum of %n and %n"><l>4</l><l>6</l></custom-block></script><script x="20" y="129"><custom-block s="minimum of %n and %n"><l>-1</l><l>2</l></custom-block></script><script x="20" y="162.00000000000003"><custom-block s="maximum of list %l"><block s="reportNewList"><list><l>1</l><l>22</l><l>3</l><l>-4</l></list></block></custom-block></script><script x="20" y="199.00000000000003"><custom-block s="minimum of list %l"><block s="reportNewList"><list><l>1</l><l>22</l><l>3</l><l>-4</l></list></block></custom-block></script><script x="20" y="236.00000000000003"><custom-block s="sum of list %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>10</l></list></block></custom-block></script><script x="20" y="273"><custom-block s="average of list %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>4</l></list></block></custom-block></script><script x="20" y="310"><custom-block s="average2 of list %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>4</l></list></block></custom-block></script><script x="20" y="347"><custom-block s="square roots of %n"><l>16</l></custom-block></script></scripts></sprite><sprite name="GCD" idx="4" x="161" y="-82" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="0,9.894000000000009,247.35,1" pen="tip" id="156"><costumes><list struct="atomic" id="157"></list></costumes><sounds><list struct="atomic" id="158"></list></sounds><blocks></blocks><variables></variables><scripts><script x="20" y="20"><custom-block s="common divisors of %n and %n"><l>75</l><l>200</l></custom-block></script><script x="20" y="53"><custom-block s="divisors of %n"><l>10</l></custom-block></script><script x="20" y="86"><custom-block s="divisors of %n"><l>25</l></custom-block></script><script x="20" y="119"><custom-block s="greatest common divisor of %n and %n"><l>10</l><l>25</l></custom-block></script></scripts></sprite><sprite name="Float" idx="5" x="49" y="11" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="234.60000000000002,0,168.91199999999995,1" pen="tip" id="172"><costumes><list struct="atomic" id="173"></list></costumes><sounds><list struct="atomic" id="174"></list></sounds><blocks></blocks><variables></variables><scripts><script x="20" y="20"><block s="doSetVar"><l>Pi</l><block s="reportQuotient"><l>22</l><l>7</l></block></block></script><script x="20" y="63"><block s="reportCDR"><block s="reportCDR"><block s="reportTextSplit"><block s="reportDifference"><block var="Pi"/><block s="reportMonadic"><l><option>floor</option></l><block var="Pi"/></block></block><l><option>letter</option></l></block></block></block></script><script x="20" y="113"><custom-block s="%n float places %n"><block var="Pi"/><l>4</l></custom-block></script></scripts></sprite><watcher var="Pi" style="normal" x="10" y="10" color="243,118,29"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="is %&apos;num1&apos; divisible by %&apos;num2&apos; ?" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block s="reportModulus"><block var="num1"/><block var="num2"/></block><l>0</l></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="even? %&apos;num1&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block s="reportModulus"><block var="num1"/><l>2</l></block><l>0</l></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="odd? %&apos;num1&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportNot"><custom-block s="even? %n"><block var="num1"/></custom-block></block></block></script><scripts><script x="10" y="99.66666666666663"><block s="doIfElse"><block s="reportEquals"><block s="reportModulus"><block var="num1"/><l>2</l></block><l>1</l></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></scripts></block-definition><block-definition s="integer? %&apos;num1&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block s="reportRound"><block var="num1"/></block><block var="num1"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="%&apos;in1&apos; ≤ %&apos;in2&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportOr"><block s="reportLessThan"><block var="in1"/><block var="in2"/></block><block s="reportEquals"><block var="in1"/><block var="in2"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="%&apos;in1&apos; ≥ %&apos;in2&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportOr"><block s="reportGreaterThan"><block var="in1"/><block var="in2"/></block><block s="reportEquals"><block var="in1"/><block var="in2"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="%&apos;in1&apos; ≠ %&apos;in2&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportNot"><block s="reportEquals"><block var="in1"/><block var="in2"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="is %&apos;a&apos; between %&apos;b&apos; and %&apos;c&apos; ?" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportAnd"><block s="reportGreaterThan"><block var="a"/><block var="b"/></block><block s="reportLessThan"><block var="a"/><block var="c"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="number of divisors %&apos;number&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>count</l></list></block><block s="doSetVar"><l>count</l><l>0</l></block><block s="doWarp"><script><block s="doFor"><l>i</l><l>1</l><block var="number"/><script><block s="doIf"><block s="reportEquals"><block s="reportModulus"><block var="number"/><block var="i"/></block><l>0</l></block><script><block s="doSetVar"><l>count</l><block s="reportSum"><block var="count"/><l>1</l></block></block></script></block></script><comment w="80" collapsed="false">algorithm</comment></block></script></block><block s="doReport"><block var="count"/></block></script><scripts><script x="295.0595703125" y="336.6666666666667"><block var="i"/></script><script x="309.0595703125" y="271.66666666666663"><block var="i"/></script><script x="274.0595703125" y="273.66666666666663"><block var="i"/></script><script x="264.0595703125" y="333.6666666666667"><block var="i"/></script><script x="237.0595703125" y="321.66666666666663"><block var="i"/></script><script x="217.0595703125" y="304.66666666666663"><block var="i"/></script><script x="361.0595703125" y="299.66666666666663"><block var="i"/></script><script x="348.0595703125" y="320.66666666666663"><block var="i"/></script><script x="324.0595703125" y="331.6666666666667"><block var="i"/></script></scripts></block-definition><block-definition s="divisors of %&apos;number&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>divList</l></list></block><block s="doSetVar"><l>divList</l><block s="reportNewList"><list></list></block></block><block s="doWarp"><script><block s="doFor"><l>i</l><l>1</l><block var="number"/><script><block s="doIf"><custom-block s="is %n divisible by %n ?"><block var="number"/><block var="i"/></custom-block><script><block s="doAddToList"><block var="i"/><block var="divList"/></block></script></block></script></block></script></block><block s="doReport"><block var="divList"/></block></script></block-definition><block-definition s="is %&apos;number&apos; a prime number?" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><custom-block s="number of divisors %n"><block var="number"/></custom-block><l>2</l></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="find all prime numbers in the first %&apos;maxnum&apos; numbers" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>primeList</l></list></block><block s="doSetVar"><l>primeList</l><block s="reportNewList"><list></list></block></block><block s="doWarp"><script><block s="doFor"><l>number</l><l>2</l><block var="maxnum"/><script><block s="doIf"><custom-block s="is %n a prime number?"><block var="number"/></custom-block><script><block s="doAddToList"><block var="number"/><block var="primeList"/></block></script></block></script></block></script></block><block s="doReport"><block var="primeList"/></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="%n"></input><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>sum</l></list></block><block s="doSetVar"><l>sum</l><l>0</l></block><block s="doWarp"><script><block s="doFor"><l>i</l><block var="num1"/><block var="num2"/><script><block s="doSetVar"><l>sum</l><block s="reportSum"><block var="sum"/><block var="i"/></block></block></script></block></script></block><block s="doReport"><block var="sum"/></block></script></block-definition><block-definition s="maximum of %&apos;num1&apos; and %&apos;num2&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIfElse"><custom-block s="%s ≥ %s"><block var="num1"/><block var="num2"/></custom-block><script><block s="doReport"><block var="num1"/></block></script><script><block s="doReport"><block var="num2"/></block></script></block></script></block-definition><block-definition s="minimum of %&apos;num1&apos; and %&apos;num2&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIfElse"><custom-block s="%s ≤ %s"><block var="num1"/><block var="num2"/></custom-block><script><block s="doReport"><block var="num1"/></block></script><script><block s="doReport"><block var="num2"/></block></script></block></script></block-definition><block-definition s="maximum of list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportCombine"><block var="list"/><block s="reifyReporter"><autolambda><custom-block s="maximum of %n and %n"><l></l><l></l></custom-block></autolambda><list></list></block></block></block></script></block-definition><block-definition s="minimum of list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportCombine"><block var="list"/><block s="reifyReporter"><autolambda><custom-block s="minimum of %n and %n"><l></l><l></l></custom-block></autolambda><list></list></block></block></block></script></block-definition><block-definition s="sum of list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportCombine"><block var="list"/><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block></block></block></script></block-definition><block-definition s="average of list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportQuotient"><custom-block s="sum of list %l"><block var="list"/></custom-block><block s="reportListAttribute"><l><option>length</option></l><block var="list"/></block></block></block></script></block-definition><block-definition s="average2 of list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>sum</l><l>count</l></list></block><block s="doSetVar"><l>sum</l><l>0</l></block><block s="doSetVar"><l>count</l><l>0</l></block><block s="doForEach"><l>number</l><block var="list"/><script><block s="doSetVar"><l>sum</l><block s="reportSum"><block var="sum"/><block var="number"/></block></block><block s="doChangeVar"><l>count</l><l>1</l></block></script></block><block s="doReport"><block s="reportQuotient"><block var="sum"/><block var="count"/></block></block></script></block-definition><block-definition s="square roots of %&apos;number&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>positive root</l><l>negative root</l></list></block><block s="doSetVar"><l>positive root</l><block s="reportMonadic"><l><option>sqrt</option></l><block var="number"/></block></block><block s="doSetVar"><l>negative root</l><block s="reportProduct"><block var="positive root"/><l>-1</l></block></block><block s="doReport"><block s="reportNewList"><list><block var="positive root"/><block var="negative root"/></list></block></block></script></block-definition><block-definition s="common divisors of %&apos;num1&apos; and %&apos;num2&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>common</l><l>list1</l><l>list2</l></list></block><block s="doSetVar"><l>common</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>list1</l><custom-block s="divisors of %n"><block var="num1"/></custom-block></block><block s="doSetVar"><l>list2</l><custom-block s="divisors of %n"><block var="num2"/></custom-block></block><block s="doForEach"><l>divisor</l><block var="list1"/><script><block s="doIf"><block s="reportListContainsItem"><block var="list2"/><block var="divisor"/></block><script><block s="doAddToList"><block var="divisor"/><block var="common"/></block></script></block></script></block><block s="doReport"><block var="common"/></block></script></block-definition><block-definition s="greatest common divisor of %&apos;num1&apos; and %&apos;num2&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportCombine"><custom-block s="common divisors of %n and %n"><block var="num1"/><block var="num2"/></custom-block><block s="reifyReporter"><autolambda><custom-block s="maximum of %n and %n"><l></l><l></l></custom-block></autolambda><list></list></block></block></block></script></block-definition><block-definition s="%&apos;number&apos; float places %&apos;places&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>decimals</l><l>temp</l></list></block><block s="doSetVar"><l>temp</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>decimals</l><block s="reportCDR"><block s="reportCDR"><block s="reportTextSplit"><block s="reportDifference"><block var="number"/><block s="reportMonadic"><l><option>floor</option></l><block var="number"/></block></block><l><option>letter</option></l></block></block></block></block><block s="doFor"><l>digit</l><l>1</l><block var="places"/><script><block s="doAddToList"><block s="reportListItem"><block var="digit"/><block var="decimals"/></block><block var="temp"/></block></script></block><block s="doIf"><custom-block s="%s ≥ %s"><block s="reportListItem"><block s="reportSum"><block var="places"/><l>1</l></block><block var="decimals"/></block><l>5</l></custom-block><script><block s="doReplaceInList"><block var="places"/><block var="temp"/><block s="reportSum"><block s="reportListItem"><block var="places"/><block var="temp"/></block><l>1</l></block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportMonadic"><l><option>floor</option></l><block var="number"/></block><l>.</l><custom-block s="list $arrowRight word %l"><block var="temp"/></custom-block></list></block></block></script></block-definition><block-definition s="all but first letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="199" collapsed="false">Takes a text string as input, and reports a new text string containing all but the first character of the input.</comment><header></header><code></code><translations>pt:_ sem o primeiro caractere&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l><l>i</l></list></block><block s="doIf"><block s="reportIsA"><block var="string"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="all but first letter of %txt"><l></l></custom-block></autolambda><list></list></block><block var="string"/></block></block></script></block><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>str</l></list><l>return str.slice(1);</l></block><list><custom-block s="require nonempty %s %s"><block var="string"/><l>All but first of empty word.</l></custom-block></list></block></block></script><scripts><script x="11.333333333333334" y="249.0000000000001"><block s="doWarp"><script><block s="doSetVar"><l>result</l><l></l></block><block s="doSetVar"><l>i</l><l>2</l></block><block s="doUntil"><block s="reportGreaterThan"><block var="i"/><block s="reportStringSize"><block var="string"/></block></block><script><block s="doSetVar"><l>result</l><block s="reportJoinWords"><list><block var="result"/><block s="reportLetter"><block var="i"/><block var="string"/></block></list></block></block><block s="doChangeVar"><l>i</l><l>1</l></block></script></block><block s="doReport"><block var="result"/></block></script></block></script></scripts></block-definition><block-definition s="all but first word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="223.000001" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing all but the first word, with one space between words and no spaces at the beginning or end. (Note: consider using SENTENCE➞LIST and processing the resulting list instead of doing recursion on sentences in text string form.  List operations are faster.)</comment><header></header><code></code><translations>pt:_ sem a primeira palavra&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="sentence"/></block><script><custom-block s="error %txt"><l>All but first of empty sentence.</l></custom-block></script><script><block s="doReport"><block s="reportCDR"><block var="sentence"/></block></block></script></block></script></block><block s="doReport"><custom-block s="list $arrowRight sentence %l"><block s="reportCDR"><custom-block s="require nonempty %s %s"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block><l>All but first of empty sentence.</l></custom-block></block></custom-block></block></script><scripts><script x="13.333333333333334" y="368.8888888888889"><block s="doDeclareVariables"><list><l>index</l><l>bf</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>bf</l><l></l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><custom-block s="error %txt"><l>All but first of empty sentence.</l></custom-block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportGreaterThan"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><script><block s="doSetVar"><l>bf</l><block s="reportJoinWords"><list><block var="bf"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block var="bf"/></block></script></block></script></scripts></block-definition><block-definition s="all but last letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="218" collapsed="false">Takes a text string as input, and reports a new text string containing all but the last letter of the input.</comment><header></header><code></code><translations>pt:_ sem o último caractere&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l><l>i</l></list></block><block s="doIf"><block s="reportIsA"><block var="string"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="all but last letter of %txt"><l></l></custom-block></autolambda><list></list></block><block var="string"/></block></block></script></block><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>str</l></list><l>return str.slice(0,-1);</l></block><list><custom-block s="require nonempty %s %s"><block var="string"/><l>All but last of empty word.</l></custom-block></list></block></block></script><scripts><script x="10" y="264.77777777777777"><block s="doWarp"><script><block s="doSetVar"><l>result</l><l></l></block><block s="doSetVar"><l>i</l><l>1</l></block><block s="doUntil"><block s="reportEquals"><block var="i"/><block s="reportStringSize"><block var="string"/></block></block><script><block s="doSetVar"><l>result</l><block s="reportJoinWords"><list><block var="result"/><block s="reportLetter"><block var="i"/><block var="string"/></block></list></block></block><block s="doChangeVar"><l>i</l><l>1</l></block></script></block><block s="doReport"><block var="result"/></block></script></block></script></scripts></block-definition><block-definition s="all but last word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="211.99999999999997" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing all but the last word, with one space between words and no spaces at the beginning or end.  (Note: consider using SENTENCE-&gt;LIST and processing the resulting list instead of doing recursion on sentences in text string form.  List operations are faster.)</comment><header></header><code></code><translations>pt:_ sem a última palavra&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="sentence"/></block><script><custom-block s="error %txt"><l>All but last of empty sentence.</l></custom-block></script><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>arr</l></list><l>return new List(arr.itemsArray().slice(0,-1));</l></block><list><block var="sentence"/></list></block></block></script></block></script></block><block s="doReport"><custom-block s="list $arrowRight sentence %l"><block s="evaluate"><block s="reportJSFunction"><list><l>arr</l></list><l>return new List(arr.asArray().slice(0,-1));</l></block><list><custom-block s="require nonempty %s %s"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block><l>All but last of empty sentence.</l></custom-block></list></block></custom-block></block></script><scripts><script x="9.333333333333334" y="384.4444444444446"><block s="doDeclareVariables"><list><l>index</l><l>bl</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>bl</l><l></l></block><block s="doSetVar"><l>index</l><block s="reportStringSize"><block var="sentence"/></block></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><custom-block s="error %txt"><l>All but last of empty sentence.</l></custom-block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="index"/><l>1</l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportLessThan"><block var="index"/><l>1</l></block><script><block s="doSetVar"><l>bl</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="bl"/></list></block></block><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doReport"><block var="bl"/></block></script></block></script><script x="249" y="393.55555555555566"><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportLessThan"><block var="index"/><block s="reportListAttribute"><l><option>length</option></l><block var="sentence"/></block></block></autolambda><list><l>value</l><l>index</l></list></block><block var="sentence"/></block></script></scripts></block-definition><block-definition s="first word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="236" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing only the first word, with no spaces before or after it.</comment><header></header><code></code><translations>pt:a primeira palavra de _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="sentence"/></block><script><custom-block s="error %txt"><l>First of empty sentence.</l></custom-block></script><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="sentence"/></block></block></script></block></script><script><block s="doReport"><block s="reportListItem"><l>1</l><custom-block s="require nonempty %s %s"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block><l>First of empty sentence.</l></custom-block></block></block></script></block></script><scripts><script x="9.333333333333334" y="345.5555555555555"><block s="doDeclareVariables"><list><l>index</l><l>first</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>first</l><l></l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><custom-block s="error %txt"><l>First of empty sentence.</l></custom-block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><custom-block s="error %txt"><l>First of empty sentence.</l></custom-block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>first</l><block s="reportJoinWords"><list><block var="first"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>first</l><block s="reportJoinWords"><list><block var="first"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block></script></block><block s="doReport"><block var="first"/></block></script></block></script></scripts></block-definition><block-definition s="last letter of %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="260" collapsed="false">Takes a text string as input, and reports the last character in the string.</comment><header></header><code></code><translations>pt:o último caractere de _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="word"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="last letter of %txt"><l></l></custom-block></autolambda><list></list></block><block var="word"/></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="word"/></block><l>0</l></block><script><custom-block s="error %txt"><l>Last of empty word.</l></custom-block></script></block><block s="doReport"><block s="reportLetter"><block s="reportStringSize"><block var="word"/></block><block var="word"/></block></block></script></block-definition><block-definition s="last word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="262" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing only the last word of the input, with no spaces before or after it.</comment><header></header><code></code><translations>pt:a última palavra de _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="sentence"/></block><script><custom-block s="error %txt"><l>Last of empty sentence.</l></custom-block></script><script><block s="doReport"><block s="reportListItem"><l><option>last</option></l><block var="sentence"/></block></block></script></block></script></block><block s="doReport"><block s="reportListItem"><l><option>last</option></l><custom-block s="require nonempty %s %s"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block><l>Last of empty sentence.</l></custom-block></block></block></script><scripts><script x="25.333333333333332" y="276.22222222222223"><block s="doDeclareVariables"><list><l>index</l><l>last</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>last</l><l></l></block><block s="doSetVar"><l>index</l><block s="reportStringSize"><block var="sentence"/></block></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><custom-block s="error %txt"><l>Last of empty sentence.</l></custom-block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><custom-block s="error %txt"><l>Last of empty sentence.</l></custom-block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>last</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="last"/></list></block></block><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>last</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="last"/></list></block></block></script></block><block s="doReport"><block var="last"/></block></script></block></script></scripts></block-definition><block-definition s="empty word? %&apos;word&apos;" type="predicate" category="operators"><comment x="0" y="0" w="208" collapsed="false">Takes a text string as input, and reports TRUE if the string has no characters in it of any kind, otherwise false.</comment><header></header><code></code><translations>pt:a palavra _ está vazia&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="word"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="empty word? %txt"><l></l></custom-block></autolambda><list></list></block><block var="word"/></block></block></script></block><block s="doReport"><block s="reportEquals"><block s="reportStringSize"><block var="word"/></block><l>0</l></block></block></script></block-definition><block-definition s="empty sentence? %&apos;sentence&apos;" type="predicate" category="operators"><comment x="0" y="0" w="221" collapsed="false">Takes a text string as input, and reports TRUE if the input contains no characters other than spaces (therefore, no words when the string is considered as a sentence), otherwise FALSE.</comment><header></header><code></code><translations>pt:a frase _ está vazia&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l></list></block><block s="doIf"><block s="reportIsA"><block var="sentence"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportListIsEmpty"><block var="sentence"/></block></block></script></block><block s="doReport"><block s="reportListIsEmpty"><custom-block s="sentence $arrowRight list %txt"><block var="sentence"/></custom-block></block></block></script><scripts><script x="12" y="258"><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></script></scripts></block-definition><block-definition s="join words %&apos;words&apos;" type="reporter" category="operators"><comment x="0" y="0" w="230.66666666666666" collapsed="false">Like JOIN, takes any number of words (text strings) and reports a sentence with its inputs concatenated, but inserts a blank space between the inputs.&#xD;Consider using SENTENCE (Lists palette) instead.</comment><header></header><code></code><translations>de:füge Wörter zusammen _&#xD;ca:uneix les paraules _&#xD;es:unir las palabras _&#xD;fr:fusionne les mots _&#xD;pt:uma frase com as palavras _&#xD;</translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="words"/></block><script><block s="doReport"><l></l></block></script></block><block s="doDeclareVariables"><list><l>first</l><l>bf</l></list></block><block s="doSetVar"><l>first</l><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="words"/></block><l><option>list</option></l></block><custom-block s="join words %mult%txt"><block s="reportListItem"><l>1</l><block var="words"/></block></custom-block><block s="reportListItem"><l>1</l><block var="words"/></block></block></block><block s="doSetVar"><l>bf</l><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block><block s="doIf"><custom-block s="empty sentence? %txt"><block var="bf"/></custom-block><script><block s="doReport"><block var="first"/></block></script></block><block s="doIf"><custom-block s="empty sentence? %txt"><block var="first"/></custom-block><script><block s="doReport"><block var="bf"/></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block var="first"/><l> </l><block var="bf"/></list></block></block></script><scripts><script x="16.666666666666668" y="409.6666666666668"><block s="doIf"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="words"/></block><l><option>list</option></l></block><script><block s="doIfElse"><custom-block s="empty sentence? %txt"><block var="first"/></custom-block><script><block s="doReport"><block var="bf"/></block></script><script><block s="doIfElse"><custom-block s="empty sentence? %txt"><block var="bf"/></custom-block><script><block s="doReport"><block var="first"/></block></script><script><block s="doReport"><block s="reportJoinWords"><list><block var="first"/><l> </l><block var="bf"/></list></block></block></script></block></script></block></script></block><block s="doIf"><custom-block s="empty sentence? %txt"><block s="reportListItem"><l>1</l><block var="words"/></block></custom-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></scripts></block-definition><block-definition s="list $arrowRight sentence %&apos;data&apos;" type="reporter" category="operators"><comment x="0" y="0" w="165.33333333333334" collapsed="false">Takes a sentence in list form and reports the sentence as a text string.</comment><header></header><code></code><translations>de:Liste $arrowRight Satz _&#xD;ca:llista $arrowRight frase _&#xD;es:lista $arrowRight frase _&#xD;fr:liste $arrowRight phrase _&#xD;pt:uma frase com as palavras em _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="join words %mult%txt"><block var="data"/></custom-block></block></script></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><comment x="0" y="0" w="196" collapsed="false">Takes a sentence in text string form and reports the sentence as a list of its words.</comment><header></header><code></code><translations>de:Satz $arrowRight Liste _&#xD;ca:frase $arrowRight llista _&#xD;es:frase $arrowRight lista _&#xD;fr:phrase $arrowRight liste _&#xD;pt:uma lista com as palavras da frase _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportEquals"><block s="reportStringSize"><l></l></block><l>0</l></block></block></autolambda><list></list></block><block s="reportTextSplit"><block var="text"/><l><option>word</option></l></block></block></block></script></block-definition><block-definition s="word $arrowRight list %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="146.42857142857144" collapsed="false">report a list in which each item is one letter from the input word</comment><header></header><code></code><translations>de:Wort $arrowRight Liste _&#xD;ca:paraula $arrowRight llista _&#xD;es:palabra $arrowRight lista _&#xD;fr:mot $arrowRight liste _&#xD;pt:uma lista com os caracteres da palavra _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="word"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="word $arrowRight list %txt"><l></l></custom-block></autolambda><list></list></block><block var="word"/></block></block></script></block><block s="doReport"><block s="reportTextSplit"><block var="word"/><l><option>letter</option></l></block></block></script></block-definition><block-definition s="list $arrowRight word %&apos;list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="158.57142857142858" collapsed="false">join all the items of the input list&#xD;into a single word, and report it</comment><header></header><code></code><translations>de:Liste $arrowRight Wort _&#xD;ca:llista $arrowRight paraula _&#xD;es:lista $arrowRight palabra _&#xD;fr:liste $arrowRight mot _&#xD;pt:uma palavra com os caracteres em _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="list"/></block><script><block s="doReport"><block var="list"/></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l><option>list</option></l></block></autolambda><list></list></block><block var="list"/></block><l></l></block><script><block s="doReport"><block s="reportJoinWords"><block var="list"/></block></block></script></block><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><l></l><l><option>list</option></l></block><block s="reportNewList"><list><custom-block s="list $arrowRight word %l"><l/></custom-block></list></block><l></l></block></autolambda><list></list></block><block var="list"/></block></block></script></block-definition><block-definition s="sentence %&apos;phrase&apos;" type="reporter" category="lists"><comment x="0" y="0" w="302.6666666666667" collapsed="false">SENTENCE is the main constructor for sentences, represented&#xD;as lists of words.  It takes zero or more inputs, each of which can&#xD;be either a list or a text string.  If a list, the input is assumed to be&#xD;a list of words.  If a text string, it is converted to a list of words using&#xD;SENTENCE→LIST.  Then all the lists of words are appended to form a new list of words.&#xD;&#xD;If the inputs are lists of lists rather than lists of words, SENTENCE,&#xD;like APPEND, does only one level of flattening, reporting a list of&#xD;all the items of all the input lists.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%s"></input></inputs><script><block s="doReport"><block s="reportConcatenatedLists"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><l></l><l><option>list</option></l></block><l></l><custom-block s="sentence $arrowRight list %txt"><l></l></custom-block></block></autolambda><list></list></block><block var="phrase"/></block></block></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><header></header><code></code><translations>pt:lança o erro _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l></list><l>throw new Error(msg);</l></block><list><block var="msg"/></list></block></script></block-definition><block-definition s="printable %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="188.66666666666666" collapsed="false">Takes a (possibly deep) list as input,&#xD;and reports a human-readable text form &#xD;of the list (namely, Lisp notation).</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="data"/><l><option>list</option></l></block></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><l>()</l></block></script></block><block s="doReport"><block s="reportJoinWords"><list><l>(</l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="printable %l"><l/></custom-block></autolambda><list></list></block><block var="data"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> </l><l></l></list></block></autolambda><list></list></block></block><l>)</l></list></block></block></script></block-definition><block-definition s="require nonempty %&apos;text&apos; %&apos;message&apos;" type="reporter" category="operators"><comment x="0" y="0" w="220" collapsed="false">Helper function for word/sentence library.&#xD;Reports its first input, unless that input is empty, in which case it gives its second input as an error message.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportIfElse"><block s="reportIsA"><block var="text"/><l><option>list</option></l></block><block s="reportListIsEmpty"><block var="text"/></block><block s="reportEquals"><block s="reportStringSize"><block var="text"/></block><l>0</l></block></block><script><custom-block s="error %txt"><block var="message"/></custom-block></script><script><block s="doReport"><block var="text"/></block></script></block></script></block-definition><block-definition s="first letter of %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="260" collapsed="false">Takes a text string as input, and reports the first character in the string.</comment><header></header><code></code><translations>pt:a primeira palavra de _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="word"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="first letter of %txt"><l></l></custom-block></autolambda><list></list></block><block var="word"/></block></block></script><script><block s="doReport"><block s="reportLetter"><l>1</l><custom-block s="require nonempty %s %s"><block var="word"/><l>First of empty word.</l></custom-block></block></block></script></block></script><scripts><script x="14.666666666666666" y="232.8888888888888"><block s="doDeclareVariables"><list><l>index</l><l>first</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>first</l><l></l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><custom-block s="error %txt"><l>First of empty sentence.</l></custom-block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><custom-block s="error %txt"><l>First of empty sentence.</l></custom-block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>first</l><block s="reportJoinWords"><list><block var="first"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>first</l><block s="reportJoinWords"><list><block var="first"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block></script></block><block s="doReport"><block var="first"/></block></script></block></script></scripts></block-definition></blocks><variables><variable name="Pi"><l>3.142857142857143</l></variable></variables></project><media name="U2L4-MathLibrary" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>