<snapdata remixID="9322359"><project name="search algorithms" app="Snap! 5.4, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAACYlJREFUeAHtnVtIVVkYx7+jNomW6VjTTX2pNDRvM92giKIiGghyokBsIIamC9HrvASRb0NN81TzEkkTEb1E8xCkNVQgONFNQ2XQLElLS9Mh7KIe9cz3rXP28XhZpVDrrO3+r/Ccvb+91vq+9Vt/174Y+/MFuBAKCESJQEyU/MItCCgCECCEEFUCEGBU8cM5BAgNRJUABBhV/HAe9ykEAwMD1NbWRr29vaGqPv4O3jgPb43qhQ/4uMrY2+vIFrItZWxfkbWCdSI/h48Ob0Ue520+MGvmLJo7b+6oA9i1jYDvY49h3r17Ry3PntH0+HiOWxTlIx+vmerBjVKYj60Bnu8YtgXkU6qoeiICpYRgS7UbrC121Rt/OhLiPqSh9KmKY1edKEtCQgLRkJ862ttCdcb/6n7dQRmLc1TX9fX1tG3btvErwmoFAa0A/X4/1fEExk9n8SkdiNBCwhCd+EROIc2EdcIWttOQaNARlVTiHz4kYnVEHNyX9qE2XEWKqqM8BaUt9aT9tWPF9FN6F8VN4KIh4ZdKauh8r0R94+8bdPjwYdU3PuwjoD0FNz1+TLExMeT396mo8/MLaMGCBTRz5ky172OhpaSkqFNzdXU1bd68mQoKCtRKWFtbS8ePH6fH3MfRo0fpxYsX1NzcTA8ePKCys2d5FY2hjRs30sKFC+jYsVLa/eNuqiivoERe5dasXUunTp2iCxcuqNWroqJc+fvmq4ER4pvx6zN6f2IdxczLpsGW+xTo6RxB19/vV/vr1q0bYceOXQS068nA4CD19/dTf18/9fHP/fv3qaOjgxobG9VPQ0MD3blzh0RsIkYR24kTJ6i7u5uampq4TR/t3LmTdu3aRatXr6YnT55QSUkJ5eXnq35evnxJW7d+T1lZWTQraRZdvXqVBblQCTYtLY2uXbtGycnJagUW/6PLwL83yJeYSoOtD3mFj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ADRiYzRCAAM1whhcNAQhQAwZmMwQgQDOc4UVDAALUgIHZDAEI0AxneNEQgAA1YGA2QwACNMMZXjQEIEANGJjNEIAAzXCGFw0BCFADBmYzBCBAM5zhRUMAAtSAgdkMAQjQDGd40RCAADVgYDZDAAI0wxleNAT+B85ao5HQRLA4AAAAAElFTkSuQmCC</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" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAC99JREFUeAHt0DEBAAAAwqD1T20MH4hAYcCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwY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MCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBj4DAyN/gABHhb3AgAAAABJRU5ErkJggg==</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="-94.99999999999932" y="5.684341886080802e-14" 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="30" y="30"><block s="doSetVar"><l>awful list</l><block s="reportNewList"><list><l>2</l><l>12</l><l>44</l><l>4</l><l>5</l><l>0</l><l>8</l><l>2</l><l>4</l><l>6</l></list></block></block><custom-block s="say position of number %n in sorted list %l"><l>2</l><block var="awful list"/></custom-block></script><script x="30" y="95"><custom-block s="sort list %s"><l></l></custom-block></script><script x="30" y="134"><custom-block s="position of number %n in sorted list %l"><l>73</l><block var="awful list"/></custom-block></script><script x="30" y="168"><block s="bubble"><custom-block s="sort list %l"><block s="reportNewList"><list><l>73</l><l>73</l><l>12</l><l>1</l><l>7</l><l>8</l><l>9</l><l>11</l><l>21</l><l>22</l><l>23</l><l>24</l><l>96</l><l>99</l></list></block></custom-block></block></script><script x="30" y="215"><custom-block s="position of number %n in unsorted list %l"><l>1</l><block s="reportNewList"><list><l>5</l><l>4</l><l>6</l><l>90</l><l>265713r165387</l><l>1</l></list></block></custom-block></script></scripts></sprite><watcher var="position" style="normal" x="10.000000000000114" y="10" color="243,118,29" hidden="true"/><watcher var="position 2" style="normal" x="10.000000000000114" y="31.000001999999995" color="243,118,29" hidden="true"/><watcher var="item" style="normal" x="10.000000000000114" y="52.00000399999999" color="243,118,29" hidden="true"/><watcher var="Number of guesses" style="normal" x="19.999999999999886" y="20.000000000000007" color="243,118,29"/><watcher var="pos." style="normal" x="19.999999999999886" y="62.000003999999976" color="243,118,29" hidden="true"/><watcher var="index" style="normal" x="10" y="10" color="243,118,29" hidden="true"/><watcher var="awful list" style="normal" x="311.9999999999998" y="12" color="243,118,29" hidden="true"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="position of number %&apos;number&apos; in unsorted list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>position</l></list></block><block s="doSetVar"><l>position</l><l>0</l></block><block s="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="number"/></block><script><block s="doForEach"><l>item</l><block var="list"/><script><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block var="item"/><block var="number"/></block><script><block s="doReport"><block var="position"/></block></script></block></script></block></script><script><block s="doReport"><block s="reportJoinWords"><list><block var="number"/><l> not in ,ist </l></list></block></block></script></block></script></block-definition><block-definition s="sort list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doFor"><l>i</l><l>1</l><block s="reportListLength"><block var="list"/></block><script><block s="doSetVar"><l>position</l><l>1</l></block><block s="doSetVar"><l>position 2</l><l>2</l></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doIfElse"><block s="reportLessThan"><block s="reportListItem"><block var="position 2"/><block var="list"/></block><block s="reportListItem"><block var="position"/><block var="list"/></block></block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><block var="position"/><block var="list"/></block></block><block s="doReplaceInList"><block var="position"/><block var="list"/><block s="reportListItem"><block var="position 2"/><block var="list"/></block></block><block s="doReplaceInList"><block var="position 2"/><block var="list"/><block var="item"/></block><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doChangeVar"><l>position 2</l><l>1</l></block></script><script><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doChangeVar"><l>position 2</l><l>1</l></block></script></block></script></block><block s="doDeleteFromList"><block s="reportDifference"><block s="reportListLength"><block var="list"/></block><l>1</l></block><block var="list"/></block></script></block><block s="doReport"><block var="list"/></block></script></block-definition><block-definition s="position of number %&apos;number&apos; in sorted list %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>position</l></list></block><custom-block s="sort list %s"><block var="list"/></custom-block><block s="doSetVar"><l>position</l><l>0</l></block><block s="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="number"/></block><script><block s="doUntil"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="list"/></block><block var="number"/></block><script><block s="doForEach"><l>item</l><block var="list"/><script><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block var="item"/><block var="number"/></block><script><block s="doReport"><block var="position"/></block></script></block></script></block></script></block></script><script><block s="doReport"><l>0</l></block></script></block></script></block-definition><block-definition s="sort list %&apos;list&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doFor"><l>i</l><l>1</l><block s="reportListLength"><block var="list"/></block><script><block s="doSetVar"><l>position</l><l>1</l></block><block s="doSetVar"><l>position 2</l><l>2</l></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doIfElse"><block s="reportLessThan"><block s="reportListItem"><block var="position 2"/><block var="list"/></block><block s="reportListItem"><block var="position"/><block var="list"/></block></block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><block var="position"/><block var="list"/></block></block><block s="doReplaceInList"><block var="position"/><block var="list"/><block s="reportListItem"><block var="position 2"/><block var="list"/></block></block><block s="doReplaceInList"><block var="position 2"/><block var="list"/><block var="item"/></block><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doChangeVar"><l>position 2</l><l>1</l></block></script><script><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doChangeVar"><l>position 2</l><l>1</l></block></script></block></script></block><block s="doDeleteFromList"><block s="reportDifference"><block s="reportListLength"><block var="list"/></block><l>1</l></block><block var="list"/></block></script></block><block s="doReport"><block var="list"/></block></script></block-definition><block-definition s="say position of number %&apos;number&apos; in sorted list %&apos;list&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="number"/></block><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>list</l><custom-block s="sort list %l"><block var="list"/></custom-block></block><block s="doSetVar"><l>Number of guesses</l><l>0</l></block><block s="doSetVar"><l>position</l><l>0</l></block><block s="doSetVar"><l>a</l><l>0</l></block><block s="doUntil"><block s="reportEquals"><block var="a"/><l>1</l></block><script><block s="bubble"><l>loading</l></block><block s="doSetVar"><l>index</l><block s="reportRandom"><l>1</l><block s="reportListLength"><block var="list"/></block></block></block><block s="doSetVar"><l>Number of guesses</l><block s="reportSum"><block var="Number of guesses"/><l>1</l></block></block><block s="doSetVar"><l>position</l><l>0</l></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block var="position"/><block var="index"/></block><script><block s="doIf"><block s="reportEquals"><block var="number"/><block var="item"/></block><script><block s="bubble"><custom-block s="position of number %n in unsorted list %l"><block var="number"/><block var="list"/></custom-block></block><block s="bubble"><block s="reportJoinWords"><list><l>it took </l><block var="Number of guesses"/><l> guesses</l></list></block></block><block s="doSetVar"><l>a</l><l>1</l></block></script></block></script></block></script></block></script></block></script><script><block s="bubble"><l>number not in list</l></block></script></block></script></block-definition><block-definition s="Number guessing game" type="command" category="looks"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="tell %s to %cs"><l>Sprite(2)</l><script><block s="bubble"><l>I&apos;m thinking of a number from 1 to 60.</l></block></script></custom-block><block s="doDeclareVariables"><list><l>secret number</l><l>number of guesses</l><l>guesses</l></list></block><block s="doSetVar"><l>secret number</l><block s="reportRandom"><l>1</l><l>60</l></block></block><block s="doSetVar"><l>number of guesses</l><l>0</l></block><block s="doSetVar"><l>guesses</l><block s="reportNewList"><list></list></block></block><block s="doUntil"><block s="reportEquals"><block s="getLastAnswer"></block><block var="secret number"/></block><script><block s="doAsk"><l>Guess my secret number.</l></block><block s="doAddToList"><block s="getLastAnswer"></block><block var="guesses"/></block><block s="doSetVar"><l>number of guesses</l><block s="reportSum"><block var="number of guesses"/><l>1</l></block></block><custom-block s="tell %s to %cs"><l>Sprite(2)</l><script><block s="bubble"><block s="reportJoinWords"><list><l>Is it </l><block s="getLastAnswer"></block><l>?</l></list></block></block></script></custom-block><block s="doSayFor"><custom-block s="high or low answer: %n secret number: %n"><block s="getLastAnswer"></block><block var="secret number"/></custom-block><l>2</l></block></script></block><block s="doSayFor"><block s="reportJoinWords"><list><l>You guessed it in </l><block var="number of guesses"/><l> guesses.</l></list></block><l>3</l></block></script></block-definition><block-definition s="high or low answer: %&apos;answer&apos; secret number: %&apos;secret number&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="answer"/><block var="secret number"/></block><script><block s="doReport"><l>Yay!</l></block></script></block><block s="doIfElse"><block s="reportLessThan"><block var="answer"/><block var="secret number"/></block><script><block s="doReport"><l>too low</l></block></script><script><block s="doReport"><l>too high</l></block></script></block></script></block-definition><block-definition s="tell %&apos;sprite&apos; to %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%cs"></input></inputs><script><block s="doRun"><block s="reportAttributeOf"><block var="action"/><block var="sprite"/></block><list></list></block></script></block-definition><block-definition s="computer guesses my number from %&apos;small&apos; to %&apos;big&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doBroadcast"><l>restart</l></block><block s="doDeclareVariables"><list><l>secret number</l><l>number of guesses</l><l>guesses</l></list></block><block s="doSetVar"><l>secret number</l><block s="reportRandom"><block var="small"/><block var="big"/></block></block><block s="doSetVar"><l>number of guesses</l><block var="Number of guesses"/></block><block s="doSetVar"><l>Number of guesses</l><l>0</l></block><block s="doSetVar"><l>guesses</l><block s="reportNewList"><list></list></block></block><block s="bubble"><block s="reportJoinWords"><list><l>Is it </l><block var="secret number"/><l>?</l></list></block></block><block s="doIfElse"><block s="reportEquals"><block s="getLastMessage"></block><l>winner</l></block><script><block s="doSayFor"><l>Yay that was fun!</l><l>2</l></block><block s="doStopThis"><l><option>all</option></l></block></script><script><block s="doUntil"><block s="reportEquals"><block s="getLastMessage"></block><l>winner</l></block><script><block s="doIf"><block s="reportEquals"><block s="getLastMessage"></block><l>winner</l></block><script><block s="doSayFor"><l>Yay that was fun!</l><l>2</l></block><block s="doStopThis"><l><option>all</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block s="getLastMessage"></block><l>too big</l></block><script><block s="doSetVar"><l>secret number</l><block s="reportRandom"><block var="small"/><block var="secret number"/></block></block><block s="doSetVar"><l>Number of guesses</l><block s="reportSum"><block var="Number of guesses"/><l>1</l></block></block><block s="doBroadcast"><l>restart</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="getLastMessage"></block><l>too small</l></block><script><block s="doSetVar"><l>secret number</l><block s="reportRandom"><block var="secret number"/><block var="big"/></block></block><block s="doSetVar"><l>Number of guesses</l><block s="reportSum"><block var="Number of guesses"/><l>1</l></block></block><block s="doBroadcast"><l>restart</l></block></script></block><block s="bubble"><block s="reportJoinWords"><list><l>Is it </l><block var="secret number"/><l>?</l></list></block></block><block s="doBroadcast"><l>restart</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="getLastMessage"></block><l>winner</l></block><script><block s="doSayFor"><l>Yay that was fun!</l><l>2</l></block><block s="doStopThis"><l><option>all</option></l></block></script></block></script></block></script></block-definition><block-definition s="delete first half of %&apos;list&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doRun"><block s="reifyScript"><script><custom-block s="sort list %s"><block var="list"/></custom-block></script><list></list></block><list></list></block><block s="doSetVar"><l>pos.</l><l>1</l></block><block s="doRepeat"><block s="reportRound"><block s="reportQuotient"><block s="reportListLength"><block var="list"/></block><l>2</l></block></block><script><block s="doDeleteFromList"><block var="pos."/><block var="list"/></block></script></block><block s="doReport"><block var="list"/></block></script></block-definition><block-definition s="delete second half of %&apos;list&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doRun"><block s="reifyScript"><script><custom-block s="sort list %s"><block var="list"/></custom-block></script><list></list></block><list></list></block><block s="doSetVar"><l>pos.</l><block s="reportSum"><block s="reportRound"><block s="reportQuotient"><block s="reportListLength"><block var="list"/></block><l>2</l></block></block><l>1</l></block></block><block s="doUntil"><block s="reportEquals"><block var="pos."/><block s="reportSum"><block s="reportListLength"><block var="list"/></block><l>1</l></block></block><script><block s="doDeleteFromList"><block var="pos."/><block var="list"/></block></script></block><block s="doReport"><block var="list"/></block></script></block-definition><block-definition s="sort list sp %&apos;list&apos;" type="command" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doFor"><l>i</l><l>1</l><block s="reportListLength"><block var="list"/></block><script><block s="doSetVar"><l>position</l><l>1</l></block><block s="doSetVar"><l>position 2</l><l>2</l></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doIfElse"><block s="reportLessThan"><block s="reportListItem"><block var="position 2"/><block var="list"/></block><block s="reportListItem"><block var="position"/><block var="list"/></block></block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><block var="position"/><block var="list"/></block></block><block s="doReplaceInList"><block var="position"/><block var="list"/><block s="reportListItem"><block var="position 2"/><block var="list"/></block></block><block s="doReplaceInList"><block var="position 2"/><block var="list"/><block var="item"/></block><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doChangeVar"><l>position 2</l><l>1</l></block></script><script><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doChangeVar"><l>position 2</l><l>1</l></block></script></block></script></block><block s="doDeleteFromList"><block s="reportDifference"><block s="reportListLength"><block var="list"/></block><l>1</l></block><block var="list"/></block></script></block><block s="bubble"><block var="list"/></block><block s="doReport"><l></l></block></script></block-definition><block-definition s="container" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><scripts><script x="172" y="43.99999999999994"><custom-block s="sort list %s"><block var="list"/></custom-block><block s="doDeclareVariables"><list><l>secret number</l><l>number of guesses</l><l>guesses</l></list></block><block s="doSetVar"><l>index</l><l>0</l></block><block s="doSetVar"><l>number of guesses</l><l>0</l></block><block s="doSetVar"><l>position</l><l>0</l></block><block s="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="number"/></block><script><block s="doForEach"><l>item</l><block var="list"/><script><block s="doChangeVar"><l>position</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block var="item"/><block var="number"/></block><script><block s="doSetVar"><l>index</l><block var="position"/></block></script></block></script></block><block s="doUntil"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="list"/></block><block var="number"/></block><script><block s="doAsk"><l>is it in first half or second half?</l></block><block s="doIfElse"><block s="reportEquals"><block s="getLastAnswer"></block><l>first</l></block><script><block s="doChangeVar"><l>number of guesses</l><l>1</l></block><custom-block s="delete second half of %l"><block var="list"/></custom-block></script><script><block s="doIf"><block s="reportEquals"><block s="getLastAnswer"></block><l>second</l></block><script><block s="doChangeVar"><l>number of guesses</l><l>1</l></block><custom-block s="delete first half of %l"><block var="list"/></custom-block></script></block></script></block></script></block><block s="doSayFor"><block s="reportJoinWords"><list><l>Position is </l><block var="index"/><l> , found in </l><block var="number of guesses"/><l> guesses.</l></list></block><l>3</l></block></script><script><block s="doSayFor"><l>NIL</l><l>2</l></block></script></block></script></scripts></block-definition></blocks><variables><variable name="position"><l>10</l></variable><variable name="position 2"><l>12</l></variable><variable name="item"><l>0</l></variable><variable name="awful list"><list struct="atomic" id="917">0,2,2,4,4,5,6,8,12,44</list></variable><variable name="Number of guesses"><l>10</l></variable><variable name="pos."><l>8</l></variable><variable name="index"><l>2</l></variable></variables></project><media name="search algorithms" app="Snap! 5.4, http://snap.berkeley.edu" version="1"></media></snapdata>