<snapdata remixID="10752353"><project name="Gpa calc." app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAAxVJREFUeF7t17GLz3Ecx/HPHdmuDHfSKWWSbFcMBq6kzmRUdspiuYGYTYoyuNnAjFWyGPgXmAxGFjFczk8pA+q6H1fP4fe4+ft9v+r5fXTXzU0mk8nwo0BUYA7AqLzZnwUABCEtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGwdwFwx8/7Y15vfu2YVLs3cCwP/85vcPnRvXPjwfr+88HMcvnR8Lhw7858XZeh3AXfrem5+/jk/v3o+DK8d26eJsnAFwh995fe3iWD69MtZvXv/7jclkbBy9MK6+fbbDax77VQDAKSzcOHJmLG/u+/nGm/FxXHl8b5w6cXK8WL871jZuTXHJowD+o4Hbh8+Oha35396ezM+NV/u/jAcvnoylA0v/eHk2X/MbcMrvvh3AjZdPx+Li4pQXZ/txAKf4/n/+Cb786O5YXV2d4oJH/ywA4A5NbPtPyA5veOzvAgBSkRYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpgR8pWhW3zJD4tgAAAABJRU5ErkJggg==</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="true" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAER1JREFUeF7t2z+I33cdx/HPN2lDWolQETU/WhEUBAWXIBK7FNIUiinUQREnO1WHXmKHOmnsKILNtSBmEN1EF4fqUJOULv7FP5uT4L/kThykWG2rSX9fOSgiwUBCe/e8+92jY7j8Xt/v4/eG55DrNPxHgAABAgQI7LjAtOOLBgkQIECAAIEhwI6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmySwXQJnx323LRZHDj268ezL27XhcwkQeHMEBPjNcfQpBDKB84uH7nxlvPyFA2P69DzG+15/kJemMX6ynMdTZzYvPpc9nGECBG4oIMCOg8AeFvj6uz9219Vr/3phjPGhMca/pzF+Ncb4+zymD44x3731atMYT6xtXPzqHn5Nj05gJQUEeCW/Vi+1XwTOHT35jWmaHx1j/P61AwcfePzyc7/bevfvjU8c3Dz64tkxzV8cY1yb5/HeM5sX/7RfXLwngb0gIMB74VvyjAT+j8D5Y8duf3XzrhfHGHfO0/zQmSuXfvC/PzaPMT2zuP+P8xj3TNP0yNqVC98GSYDA7hEQ4N3zXXgSArck8K333Hf4pasHTy3n6V3LA//85uOXf/rK9R+wvjj54zHmj07T/Nm1K5fO39KAHyZAYFsFBHhbeX04gU7g6bc9+Nb58NXLY4wj0zSOr125+LPuaSwTIHC9gAC7CQIrKnBucXJ9GvPamKdfnN688JEVfU2vRWDPCgjwnv3qPDiBGwusL+5/bIzx9NZvRE/L+fjaXy79lhcBArtLQIB31/fhaQi8IYGtX7xaX5z48jSmL40x/jGm6eHTVy5cekMf6i8TILAtAgK8Law+lMDOC3zt7uN3HFy+Zes3nT85xthczstTn998/tc7/yQWCRC4GQEBvhklP0Nglwuce8eJd063T8+OeXx46998D9w2Pv7Yny9s7PLH9ngE9rWAAO/rr9/Lr4LAM/ecXCxfm58fY7x/GuO7Rw5d+8wjf3jh1VV4N+9AYJUFBHiVv13vtvICX3n7vUcOH7pj638v+sA8T+dPb1743DTGvPIv7gUJrICAAK/Al+gV9q/A+uLkd8aYPzXG+NHfNu598Mnx5HL/anhzAntLQID31vflaQn8V2D96APHxrT85et/8JtpjL/eiGc55p+f2bh0Fh8BArtHQIB3z3fhSQjcksBTixMPHxjT92/yL/3w9MbFUzf5s36MAIEdEBDgHUA2QYAAAQIErhcQYDdBgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEBDgAN0kAQIECBAQYDdAgAABAgQCAQEO0E0SIECAAAEBdgMECBAgQCAQEOAA3SQBAgQIEBBgN0CAAAECBAIBAQ7QTRIgQIAAAQF2AwQIECBAIBAQ4ADdJAECBAgQEGA3QIAAAQIEAgEBDtBNEiBAgAABAXYDBAgQIEAgEPgPkcCraSQ9NGQAAAAASUVORK5CYII=</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="Sprite" idx="1" x="12.40234375" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="145,26,68,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="19.333333333333314" y="10"><block s="receiveGo"></block><block s="doBroadcast"><l>Initialize</l></block></script><script x="19.333333333333314" y="85"><block s="receiveMessage"><l>Initialize</l></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="setHeading"><l>90</l></block><block s="write"><l>Press space to start.</l><l>12</l></block><block s="clear"></block><block s="gotoXY"><block s="reportMonadic"><l><option>neg</option></l><block s="xPosition"></block></block><l>-15</l></block><block s="write"><l>Press space to start.</l><l>24</l></block></script><script x="19.333333333333314" y="282.66666666666674"><block s="receiveKey"><l><option>space</option></l></block><block s="clear"></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="setHeading"><l>90</l></block><block s="doSetVar"><l>grade list</l><block s="reportNewList"><list></list></block></block><block s="doBroadcast"><l>start</l></block></script><script x="19.333333333333314" y="438.49999999999966"><block s="receiveMessage"><l>start</l></block><custom-block s="catch %upvar %cs"><l>tag</l><script><block s="doDeclareVariables"><list><l>quit</l></list></block><block s="doSetVar"><l>quit</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="cases: if %b then %cs %mult%boolUE"><custom-block s="%b"><block s="reportCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>quit</l><block var="cont"/></block><block s="doReport"><block var="cont"/></block></script><list><l>cont</l></list></block></block></custom-block><script><block s="gotoXY"><l>0</l><l>0</l></block><block s="setHeading"><l>90</l></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><custom-block s="average %l"><block var="grade list"/></custom-block></block></block><block s="write"><custom-block s="average %l"><block var="grade list"/></custom-block><block s="reportProduct"><custom-block s="average %l"><block var="grade list"/></custom-block><l>12</l></block></block><block s="doSayFor"><custom-block s="average %l"><block var="grade list"/></custom-block><l>5</l></block><block s="doStopThis"><l><option>all</option></l></block></script><list><custom-block s="else if %b then %cs"><block s="reportListContainsItem"><block var="grade list"/><l>quit</l></block><script><block s="doDeleteFromList"><block s="reportListIndex"><l>quit</l><block var="grade list"/></block><block var="grade list"/></block><custom-block s="throw %s"><block var="tag"/></custom-block></script></custom-block><custom-block s="else if %b then %cs"><block s="reportEquals"><block s="getLastAnswer"></block><l>quit</l></block><script><block s="doRun"><block var="quit"/><list><block s="reportBoolean"><l><bool>true</bool></l></block></list></block></script></custom-block><custom-block s="else %cs"><script><block s="doAsk"><l>Input a letter grade.</l></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block s="getLastAnswer"></block><l>quit</l></block></block><script><block s="doAddToList"><custom-block s="answer if letter grade"></custom-block><block var="grade list"/></block></script></block></script></custom-block></list></custom-block></script></custom-block><block s="doBroadcast"><l>start</l></block></script><script x="466.33333333333314" y="700.9999999999995"><block s="reportQuotient"><custom-block s="sum %mult%n"><block var="grade list"/></custom-block><block s="reportListAttribute"><l><option>length</option></l><block var="grade list"/></block></block></script></scripts></sprite></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="$flash remove duplicates from %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="209" collapsed="false">Reports a new list whose items are the same as in the input list, except that if two or more equal items appear in the input list, only the first one is kept in the result.</comment><header></header><code></code><translations>ca:elimina els duplicats de _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportAtomicKeep"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block s="reportListIndex"><block var="value"/><block var="list"/></block><block var="index"/></block></autolambda><list><l>value</l><l>index</l><l>list</l></list></block><block var="data"/></block></block></script><scripts><script x="14" y="164.2222222222222"><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="reportListContainsItem"><block s="reportCDR"><block var="data"/></block><block s="reportListItem"><l>1</l><block var="data"/></block></block><script><block s="doReport"><custom-block s="$flash remove duplicates from %l"><block s="reportCDR"><block var="data"/></block></custom-block></block></script><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="$flash remove duplicates from %l"><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script></block></script></block></script></scripts></block-definition><block-definition s="$flash sort %&apos;data&apos; ordering with %&apos;function&apos;" type="reporter" category="lists"><comment x="0" y="0" w="161.14285714285708" collapsed="false">Reports a sorted version of the list in its first input slot, using the comparison function in the second input slot.  For a list of numbers, using &lt; as the comparison function will sort from low to high; using &gt; will sort from high to low.</comment><header></header><code></code><translations>ca:ordena _ segons criteri _&#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="function"/></list></block></block></script><scripts><script x="12" y="147.55555555555557"><block s="doDeclareVariables"><list><l>even items</l><l>odd items</l><l>merge</l><l>split</l><l>copy of data</l><l>id</l></list></block><block s="doSetVar"><l>id</l><block s="reifyScript"><script><block s="doReport"><l></l></block></script><list></list></block></block><block s="doSetVar"><l>copy of data</l><block s="reportMap"><block var="id"/><block var="data"/></block></block><block s="doSetVar"><l>split</l><block s="reifyScript"><script><block s="doSetVar"><l>even items</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>odd items</l><block s="reportNewList"><list></list></block></block><block s="doUntil"><block s="reportListIsEmpty"><block var="copy of data"/></block><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="copy of data"/></block><block var="odd items"/></block><block s="doDeleteFromList"><l>1</l><block var="copy of data"/></block><block s="doIf"><block s="reportNot"><block s="reportListIsEmpty"><block var="copy of data"/></block></block><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="copy of data"/></block><block var="even items"/></block><block s="doDeleteFromList"><l>1</l><block var="copy of data"/></block></script></block></script></block></script><list></list></block></block><block s="doSetVar"><l>merge</l><block s="reifyScript"><script><block s="doIf"><block s="reportEquals"><block var="#1"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="#2"/></block></script></block><block s="doIf"><block s="reportEquals"><block var="#2"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="#1"/></block></script></block><block s="doIfElse"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="#1"/></block><block s="reportListItem"><l>1</l><block var="#2"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="#1"/></block><block s="evaluate"><block var="merge"/><list><block s="reportCDR"><block var="#1"/></block><block var="#2"/></list></block></block></block></script><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="#2"/></block><block s="evaluate"><block var="merge"/><list><block var="#1"/><block s="reportCDR"><block var="#2"/></block></list></block></block></block></script></block></script><list><l>#1</l><l>#2</l></list></block></block><block s="doIf"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportCDR"><block var="data"/></block><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doRun"><block var="split"/><list></list></block><block s="doReport"><block s="evaluate"><block var="merge"/><list><custom-block s="$flash sort %l ordering with %predRing"><block var="odd items"/><block var="function"/></custom-block><custom-block s="$flash sort %l ordering with %predRing"><block var="even items"/><block var="function"/></custom-block></list></block></block></script></scripts></block-definition><block-definition s="$flash assoc %&apos;key&apos; %&apos;a-list&apos;" type="reporter" category="lists"><comment x="0" y="0" w="289.3333333333333" collapsed="false">The second input is an &quot;association list,&quot; a list of two-item lists.  Each of those smaller lists has a &quot;key&quot; as its first item and a &quot;value&quot; as its second.  ASSOC reports the first key-value pair in the association list whose key matches the first input.</comment><header></header><code></code><translations>ca:associació _ _&#xD;</translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportAtomicFindFirst"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block var="key"/><block s="reportListItem"><l>1</l><l/></block></block></autolambda><list></list></block><block var="a-list"/></block></block></script><scripts><script x="19.333333333333332" y="108.22222222222221"><block s="doIf"><block s="reportEquals"><block var="a-list"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="key"/><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="a-list"/></block></block></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="a-list"/></block></block></script></block><block s="doReport"><custom-block s="$flash assoc %s %l"><block var="key"/><block s="reportCDR"><block var="a-list"/></block></custom-block></block></script></scripts></block-definition><block-definition s="%&apos;#&apos; for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><comment x="0" y="0" w="228.57142857142858" collapsed="false">This block carries out the given script for each item of the given list, like the primitive FOR EACH.&#xD;&#xD;What&apos;s different is that it provides the # variable, which will contain the item number in the list of each item in turn, 1 while processing item 1, and so on.</comment><header></header><code></code><translations>ca:_ per cada _ de _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%upvar"></input><input type="%l"></input><input type="%ca"></input></inputs><script><block s="doIfElse"><custom-block s="☠︎ linked? %l"><block var="data"/></custom-block><script><block s="doSetVar"><l>#</l><l>1</l></block><block s="doIf"><block s="reportNot"><block s="reportListIsEmpty"><block var="data"/></block></block><script><block s="doFor"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block><script><block s="doSetVar"><l>#</l><block var="i"/></block><block s="doSetVar"><l>item</l><block s="reportListItem"><block var="i"/><block var="data"/></block></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block></script><script><block s="doUntil"><block s="reportListIsEmpty"><block var="data"/></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></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block><block s="doChangeVar"><l>#</l><l>1</l></block></script></block></script></block></script></block-definition><block-definition s="☠︎ linked? %&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="evaluate"><block s="reportJSFunction"><list><l>data</l></list><l>return data.isLinked;</l></block><list><block var="data"/></list></block></block></script></block-definition><block-definition s="☠︎ link %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><block s="reportCDR"><block var="data"/></block></block></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).&#xD;&#xD;Will not work on circular lists.</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="reportAtomicCombine"><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="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="reportAtomicMap"><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="$flash zip %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="192" collapsed="false">ZIP takes any number of lists as inputs.  The lists should all be the same length.  ZIP reports a list of lists in which the first item is a list of all the first items, the second item is a list of all the second items, etc.&#xD;Viewing the inputs as the rows of a matrix, ZIP reports its transpose.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportListItem"><l>1</l><block var="lists"/></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="lists"/></block><custom-block s="$flash zip %mult%l"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><block var="lists"/></block></custom-block></block></block></script></block-definition><block-definition s="%&apos;x&apos;" type="reporter" category="lists"><comment x="0" y="0" w="105.33333333333333" collapsed="false">The identity function reports its input.</comment><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="multimap %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="267.3333333333333" collapsed="false">Takes as input a function of N inputs and N lists.&#xD;The function is called with item 1 of all the lists as its inputs, with item 2 of all the lists as its inputs, and so on.  (The lists should all be the same length.)</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="function"/><custom-block s="%s"><l></l></custom-block></block></autolambda><list></list></block><custom-block s="$flash zip %mult%l"><block var="lists"/></custom-block></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="reportAtomicKeep"><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>whitespace</option></l></block></block></block></script></block-definition><block-definition s="cases: if %&apos;test&apos; then %&apos;result&apos; %&apos;more&apos;" type="command" category="control"><comment x="0" y="0" w="262" collapsed="false">Multi-branched conditional.&#xD;&#xD;If the first (Boolean) input is True, then the script in&#xD;the second (C-slot) input is run, and this block stops.&#xD;&#xD;Additional tests can be added by putting one or more&#xD;ELSE IF blocks in the third (variadic) Boolean slot.&#xD;Use the arrowheads to get the number of Boolean&#xD;slots you need.  Each ELSE IF block provides a Boolean&#xD;slot for a condition to test and a script slot for what to do&#xD;if the condition is True.  You can put an ELSE block in&#xD;the last Boolean input to CASES for a script to run if&#xD;all the tests turn out False.&#xD;&#xD;As soon as a condition is True, no further tests are done&#xD;and no further scripts are run.</comment><header></header><code></code><translations>pt:se _ , então _ _&#xD;</translations><inputs><input type="%b"></input><input type="%cs"></input><input type="%mult%boolUE"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doRun"><block var="result"/><list></list></block></script><script><custom-block s="catch %upvar %cs"><l>tag</l><script><block s="doForEach"><l>item</l><block var="more"/><script><block s="doIf"><block s="evaluate"><block var="item"/><list></list></block><script><custom-block s="throw %s"><block var="tag"/></custom-block></script></block></script></block></script></custom-block></script></block></script></block-definition><block-definition s="else if %&apos;test&apos; then %&apos;action&apos;" type="predicate" category="control"><comment x="0" y="0" w="176" collapsed="false">For use with the CASES block.&#xD;See its help message.</comment><header></header><code></code><translations>pt:senão, se _ , então _&#xD;</translations><inputs><input type="%b"></input><input type="%cs"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doRun"><block var="action"/><list></list></block><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="else %&apos;action&apos;" type="predicate" category="control"><comment x="0" y="0" w="176" collapsed="false">For use with the CASES block.&#xD;See its help message.</comment><header></header><code></code><translations>pt:senão, _&#xD;</translations><inputs><input type="%cs"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="%&apos;Predicate T/F&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%b"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="Predicate T/F"/><l><option>Boolean</option></l></block><script><block s="doReport"><block var="Predicate T/F"/></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script><scripts><script x="329.9335937499998" y="204.83333333333366"><block s="reportBoolean"><l><bool>false</bool></l></block></script><script x="26.000000000000114" y="161.50000000000006"><custom-block s="error %txt"><l>Boolean returned a number.</l></custom-block></script></scripts></block-definition><block-definition s="safely try %&apos;action&apos; then if %&apos;error&apos; %&apos;handler&apos;" type="command" category="control"><comment x="0" y="0" w="276" collapsed="false">Catch errors.&#xD;&#xD;Runs the first script.  If it succeeds, nothing else happens.&#xD;But if it has an error (something that would otherwise result&#xD;in a red halo around the block), then the second script is run,&#xD;with the text of the error message that would have been shown in the variable ERROR.</comment><header></header><code></code><translations>pt:tenta executar _ e, em caso de erro _ , executa _&#xD;</translations><inputs><input type="%cs"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><custom-block s="let %upvar be %s"><l>reset</l><block s="evaluate"><block s="reportJSFunction"><list><l>proc</l></list><l>var oldHandleError = proc.handleError,&#xD;    oldCatchingErrors = proc.isCatchingErrors;&#xD;&#xD;return function(){&#xD; proc.handleError = oldHandleError;&#xD; proc.isCatchingErrors = oldCatchingErrors;&#xD;}</l></block><list></list></block></custom-block><block s="doCallCC"><block s="reifyScript"><script><block s="doRun"><block s="reportJSFunction"><list><l>reset</l><l>action</l><l>handler</l><l>proc</l></list><l>proc.isCatchingErrors = true;&#xD;proc.handleError = function(error, element){&#xD; reset();&#xD; proc.context = handler;&#xD; proc.context.variables.setVar("error", error);&#xD;}&#xD;&#xD;try{&#xD; proc.evaluate(action, new List(), true);&#xD;}&#xD;catch(e){&#xD; proc.handleError(e, null);&#xD;} </l></block><list><block var="reset"/><block var="action"/><block s="reifyScript"><script><block s="doRun"><block s="reifyScript"><script><block s="doRun"><block var="handler"/><list></list></block><block s="doRun"><block var="return"/><list></list></block></script><list></list></block><list></list></block></script><list></list></block></list></block></script><list><l>return</l></list></block></block><block s="doRun"><block var="reset"/><list></list></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><comment x="0" y="0" w="268.6666666666667" collapsed="false">Throw an error.&#xD;&#xD;Makes a red halo appear around the script that runs it,&#xD;with the input text shown in a speech balloon next to&#xD;the script, just like any Snap! error.&#xD;&#xD;This is useful to put in the second script of SAFELY TRY&#xD;after some other instructions to undo the partial work of&#xD;the first script.</comment><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="let %&apos;var&apos; be %&apos;val&apos;" type="command" category="other"><comment x="0" y="0" w="183.33333333333334" collapsed="false">LET (FOO) BE (5)&#xD;is equivalent to&#xD;SCRIPT VARIABLES (FOO)&#xD;SET (FOO) TO (5)</comment><header></header><code></code><translations>pt:cria a variável de guião _ com valor _&#xD;</translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>var</l><block var="val"/></block></script></block-definition><block-definition s="safely try reporting %&apos;this&apos; then if %&apos;error&apos; report %&apos;that&apos;" type="reporter" category="control"><comment x="0" y="0" w="316.6666666666667" collapsed="false">Catch errors in a reporter.&#xD;&#xD;Evaluates its first input.  If that expression successfully reports a value, this block reports that value.  If the expression causes a Snap! error,&#xD;then the final input slot is evaluated with the text of what would have&#xD;been the error message in variable ERROR.  SAFELY TRY then reports the value of that final expression.&#xD;&#xD;Sometimes you&apos;ll want to throw an error in the final expression.  You&#xD;can put an ERROR block inside a CALL block to do that.</comment><header></header><code></code><translations></translations><inputs><input type="%anyUE"></input><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doDeclareVariables"><list><l>value</l></list></block><custom-block s="safely try %cs then if %upvar %cs"><script><block s="doSetVar"><l>value</l><block s="evaluate"><block var="this"/><list></list></block></block></script><l>err</l><script><block s="doSetVar"><l>error</l><block var="err"/></block><block s="doSetVar"><l>value</l><block s="evaluate"><block var="that"/><list></list></block></block></script></custom-block><block s="doReport"><block var="value"/></block></script></block-definition><block-definition s="answer if letter grade" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doUntil"><block s="reportOr"><block s="reportAnd"><block s="reportOr"><custom-block s="is %s between %s %s ?"><block s="reportUnicode"><block s="getLastAnswer"></block></block><l>64</l><l>71</l></custom-block><custom-block s="is %s between %s %s ?"><block s="reportUnicode"><block s="getLastAnswer"></block></block><l>96</l><l>103</l></custom-block></block><block s="reportNot"><block s="reportOr"><block s="reportEquals"><block s="getLastAnswer"></block><l>e</l></block><block s="reportEquals"><block s="getLastAnswer"></block><l>E</l></block></block></block></block><block s="reportEquals"><block s="getLastAnswer"></block><l>quit</l></block></block><script><block s="doTellTo"><l>Stage</l><block s="reifyScript"><script><block s="doAsk"><l>You have to enter a letter grade</l></block></script><list></list></block><list></list></block></script></block><block s="doReport"><block s="reportListItem"><l>2</l><custom-block s="$flash assoc %s %l"><block s="getLastAnswer"></block><custom-block s="$flash zip %mult%l"><list><block s="reportNewList"><list><l>A</l><l>B</l><l>C</l><l>D</l><l>F</l></list></block><block s="reportNumbers"><l>4</l><l>0</l></block></list></custom-block></custom-block></block></block></script></block-definition><block-definition s="repeat %&apos;action&apos; while %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="287.3333333333333" collapsed="false">Run the script repeatedly, as long as the given condition is true.  Runs the script at least once before testing the condition.</comment><header></header><code></code><translations>pt:repete _ enquanto _ $loop-0.7&#xD;</translations><inputs><input type="%cs"></input><input type="%b"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></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>de:fange _ _&#xD;ca:agafa _ _&#xD;es:atrapar _ _&#xD;fr:attrape _ _&#xD;pt:captura _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations>de:wirf _&#xD;ca:llança _&#xD;es:lanzar _&#xD;fr:lance _&#xD;pt:lança _&#xD;</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>de:fange _ _&#xD;ca:agafa _ _&#xD;es:atrapar _ _&#xD;fr:attrape _ _&#xD;pt:captura _ _&#xD;</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>de:wirf _ _&#xD;ca:llança _ _&#xD;es:lanzar _ _&#xD;fr:lance _ _&#xD;pt:lança _ _&#xD;</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="if %&apos;test&apos; do %&apos;action&apos; and pause all $pause-1-255-220-0" type="command" category="control"><comment x="0" y="0" w="263.3333333333333" collapsed="false">This is a breakpoint block, to be used in debugging.&#xD;The Boolean input specifies the condition under which&#xD;the program should pause.  (Use True for an unconditional breakpoint.)  The intent is that the script should have&#xD;SHOW VARIABLE blocks for the process&apos;s local variables.&#xD;After the pause, this block automatically hides all temporary variables.</comment><header></header><code></code><translations>de:falls _ dann _ und pause $pause-1-255-220-0&#xD;ca:si _ fes _ i atura-ho tot $pause-1-255-220-0&#xD;es:si _ haz _ y páralo todo $pause-1-255-220-0&#xD;fr:si _ faire _ et mettre tout en pause $pause-1-255-220-0&#xD;pt:se _ , então _ e faz pausa em tudo $pause-1-255-220-0&#xD;</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="ignore %&apos;x&apos;" type="command" category="control"><comment x="0" y="0" w="206.66666666666666" collapsed="false">This block does nothing.&#xD;Use it when you are calling a reporter&#xD;for its side effect and don&apos;t care about&#xD;its return value.</comment><header></header><code></code><translations>de:ignoriere _&#xD;ca:ignora _&#xD;es:ignorar _&#xD;fr:ignore _&#xD;pt:ignora _&#xD;</translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="cascade %&apos;num&apos; times %&apos;function&apos; %&apos;init&apos; %&apos;#&apos;" type="reporter" category="control"><comment x="0" y="0" w="138" collapsed="false">Call f(f(f(...(f(x))))) n times where the three input slots are n, f, and x from left to right.  The # variable can be used inside f to represent how many times f has been called.</comment><header></header><code></code><translations>pt:o resultado de _ invocações em cascata de _ com argumento inicial _ _&#xD;</translations><inputs><input type="%n"></input><input type="%repRing"></input><input type="%s"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block var="init"/></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doRepeat"><block var="num"/><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="evaluate"><block var="function"/><list><block var="result"/></list></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="cascade until %&apos;pred&apos; %&apos;function&apos; %&apos;init&apos; %&apos;#&apos;" type="reporter" category="control"><comment x="0" y="0" w="210.47493489583334" collapsed="false">Call f(f(f(...(f(x))))) until condition is true, where the three input slots are condition, f, and x from left to right.  The # variable can be used inside f or condition to indicate how many times f has been called.</comment><header></header><code></code><translations>pt:o resultado da invocação em cascata até que _ de _ com argumento inicial _ _&#xD;</translations><inputs><input type="%predRing"></input><input type="%repRing"></input><input type="%s"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block var="init"/></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list><block var="result"/></list></block><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="evaluate"><block var="function"/><list><block var="result"/></list></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="compose %&apos;f&apos; %&apos;g&apos;" type="reporter" category="control"><comment x="0" y="0" w="151.33333333333334" collapsed="false">Returns the function x↦f(g(x)) where f and g are the two inputs.</comment><header></header><code></code><translations>pt:a composição de _ com _&#xD;</translations><inputs><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="f"/><list><block s="evaluate"><block var="g"/><list><l></l></list></block></list></block></autolambda><list></list></block></block></script></block-definition><block-definition s="repeat %&apos;action&apos; until %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="202.66666666666666" collapsed="false">Like the built-in REPEAT UNTIL block, except that the ending condition is not tested until the script has been run the first time.  So the script is run at least once.</comment><header></header><code></code><translations>pt:repete _ até que _ $loop-0.7&#xD;</translations><inputs><input type="%cs"></input><input type="%boolUE"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat %&apos;action&apos; while %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="287.3333333333333" collapsed="false">Run the script repeatedly, as long as the given condition is true.  Runs the script at least once before testing the condition.</comment><header></header><code></code><translations>pt:repete _ enquanto _ $loop-0.7&#xD;</translations><inputs><input type="%cs"></input><input type="%boolUE"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat while %&apos;pred&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="264" collapsed="false">Runs the script repeatedly, as long as the condition is true. Tests the condition before the first time the script is run.  Like the built in REPEAT UNTIL except that in this block the condition must be true, not false.</comment><header></header><code></code><translations>pt:enquanto _ , repete _ $loop-0.7&#xD;</translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat %&apos;num&apos; %&apos;#&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="171" collapsed="false">Runs the script the specified number of times, like the built-in REPEAT block, but this one provides the # variable that can be used inside the script.  Try&#xD;REPEAT (200)&#xD;                MOVE (#) STEPS&#xD;   RIGHT 92&#xD;with the pen down.</comment><header></header><code></code><translations>pt:repete _ vezes _ _ $loop-0.7&#xD;</translations><inputs><input type="%n"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>#</l><l>0</l></block><block s="doRepeat"><block var="num"/><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; step %&apos;step&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="247.33333333333334" collapsed="false">The primitive FOR block uses an implicit step of ±1 depending on which of the starting and ending values is larger.  This version allows you to provide an explicit step value.  If the sign of the step input is incompatible with the ordering of the starting and ending values, the script will not be run at all.</comment><header></header><code></code><translations>pt:para _ de _ com passo _ a _ _ $loop-0.7&#xD;</translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doIfElse"><block s="reportLessThan"><block var="step"/><l>0</l></block><script><block s="doSetVar"><l>test</l><block s="reifyPredicate"><autolambda><block s="reportLessThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>test</l><block s="reifyPredicate"><autolambda><block s="reportGreaterThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script></block><block s="doUntil"><block s="evaluate"><block var="test"/><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="let %&apos;a&apos; be %&apos;val&apos; in %&apos;loop&apos; %&apos;body&apos;" type="command" category="control"><comment x="0" y="0" w="238.66666666666666" collapsed="false">Provides LOOP as a function of one input that runs&#xD;the body of the LET with A set to the function input,&#xD;so the body can run itself recursively.&#xD;See COPY block in Variables for an example of use.</comment><header></header><code></code><translations>pt:tendo _ o valor inicial _ , executa _ definido como _&#xD;</translations><inputs><input type="%upvar"></input><input type="%s"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>a</l><block var="val"/></block><block s="doSetVar"><l>loop</l><block s="reifyScript"><script><block s="doSetVar"><l>a</l><block var="new value"/></block><block s="doRun"><block var="body"/><list><block var="a"/></list></block></script><list><l>new value</l></list></block></block><block s="doRun"><block var="loop"/><list><block var="a"/></list></block></script></block-definition><block-definition s="pipe %&apos;value&apos; $arrowRight %&apos;pipe&apos;" type="reporter" category="control"><comment x="0" y="0" w="339.3333333333333" collapsed="false">The inputs are a starting value and one or more monadic functions.&#xD;The first function is called with the starting value as its input.&#xD;The second function is called with the value reported by the first function as its input, and so on.  PIPE reports the value reported by the last function.  PIPE provides an alternative notation for function composition instead of the usual nesting.&#xD;&#xD;nested acronym:                                                                 &#xD;report (combine (keep items (capital-letter? ( )) from&#xD;                  (map (letter (1) of ( )) over&#xD;                                                 (sentence→list (phrase)))) using (join ( ) ( )))&#xD;&#xD;piped acronym:                                             &#xD;report (pipe (phrase) → &#xD;            (sentence→list ( ))&#xD;                              (map (letter (1) of ( )) over ( ))&#xD;                                              (keep items (capital-letter? ( )) from ( ))&#xD;                                (combine ( ) using (join ( ) ( )))&#xD;&#xD;Some people find PIPE easier to read because the functions are called in the same order in which you read them, whereas in nested composition the innermost function is called first. </comment><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="average %&apos;input&apos;" type="reporter" category="lists"><comment x="0" y="0" w="90" collapsed="false">Reports the sum of a list divided by the length of the list for the average of the numbers in the list.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportNotEquals"><block var="input"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportAtomicCombine"><block s="reportAtomicMap"><block s="reifyReporter"><autolambda><block s="reportQuotient"><l></l><block s="reportListAttribute"><l><option>length</option></l><block var="input"/></block></block></autolambda><list></list></block><block var="input"/></block><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block></block></block></script><script><block s="doReport"><l>0</l></block></script></block></script></block-definition><block-definition s="sum %&apos;nums&apos;" type="reporter" category="operators"><comment x="0" y="0" w="202" collapsed="false">Takes any number of numbers as inputs (use the left and right arrowheads to adjust the number of input slots) and reports the result of adding them all, so&#xD;(SUM (4) (100) (8))&#xD;reports 112.</comment><header></header><code></code><translations>pt:a soma de _&#xD;</translations><inputs><input type="%mult%n"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="nums"/></block><script><block s="doReport"><l>0</l></block></script></block><block s="doReport"><block s="reportSum"><block s="reportListItem"><l>1</l><block var="nums"/></block><custom-block s="sum %mult%n"><block s="reportCDR"><block var="nums"/></block></custom-block></block></block></script></block-definition><block-definition s="is %&apos;n1&apos; between %&apos;n2&apos; %&apos;n3&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="doReport"><block s="reportOr"><block s="reportAnd"><block s="reportGreaterThan"><block var="n1"/><block var="n2"/></block><block s="reportLessThan"><block var="n1"/><block var="n3"/></block></block><block s="reportAnd"><block s="reportLessThan"><block var="n1"/><block var="n2"/></block><block s="reportGreaterThan"><block var="n1"/><block var="n3"/></block></block></block></block></script></block-definition></blocks><variables><variable name="grade list"><list struct="atomic" id="1531">4,0</list></variable></variables></project><media name="Gpa calc." app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>