<snapdata remixID="9190349"><project name="U5L1-Analyzing and Improving Searches" app="Snap! 5.4, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAABflJREFUeAHtnU1LXGcUgM+ok2pt1WBsBBvxo4WCCwshLYlQJKQVV10VXLgQi8v+AvE3lK66clXqTrrqymBIikojQTdKqYtJo1motLVa0Rmt0/uOmnH8aHLgEF96ngvzce+c98w5z3m4985qUvlkEzYIXBKBskv6Xr4WAgUCCIgIl0qg4rxvf/z4Z6mruyoV5RWSTyVX6BMX6VSyIOwev4b1hffJ02HoizfJ8dS567O5nOSSR2dnZ1jO5phA6vQ94OTkpDQ3NyeWHWkW7ApbQcLkKXV4oPBp8pRPdt+sqpQH330jf/86c7TucMmZ52Ttzc8H5WrHJ4V0v2Weyr1P750J44AfAiVnwJnpGWlsvC7ZbLZwVgvntnAGDGey4pY/OgMmnwVJE6mePPhRPsx8Ly0NxXRX7n4le3M/SP7PleLS5F3Z2n3JvP9xIWf9tXpZX1+XhoaGkhh2/BAoGpP0XP1WtYTLY9Dt4cNHMjExIR0dHZKuqJDWtjaZnZ2VpqYmKS8vl4WFBenq6pLbd+7IXxsb8vYbxdvJsvoWkfK0pG9+Ibn7X5fQDLnD5Te8hsfq6ioClhDytVO0Juk7iJHLHj4WFxdle3tb0um0TE1Py/LysmQyGWltbZXh4WFpvN4oo6OjSXxW9v/ZL6GW3/5DyttuS35no+T48c7e0Xfk9nJycHBwfJhXhwRK7gHn5uZka3NLUmUpmZ+fl5qaGunu7i5cajc3Nwv7K89X5Ma7N2R9bV2uvdMgy8+eyS+zj+Szp99KfVWJz+fiLPvgrjx578vCZ+Hy29vbK1VVVefGcvD/T6BEwNDu+Ph4cluXktq62qMfHi+HUFVZKVcyP0n19vNicLi+hl8qp7bfm7sle6Uuufdbk1u3PpL29vZTEex6InBGwNB8uPQuLS3J/n7ppdUKTGUib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TkcAAXW8iDYmgIDGQEmnI4CAOl5EGxNAQGOgpNMRQEAdL6KNCSCgMVDS6Qj8C8sfLSO1n+mVAAAAAElFTkSuQmCC</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="true" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAC99JREFUeAHt0DEBAAAAwqD1T20MH4hAYcCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYM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CAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBj4DAyN/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="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="52" y="155"><custom-block s="position of number %n in unsorted list %l"><l>12</l><block var="unsorted list"/></custom-block></script><script x="48" y="67"><custom-block s="Say position of number %n in sorted list %l"><l>11</l><block var="awful list"/></custom-block></script><script x="48" y="275"><custom-block s="duplicates in %l"><block var="awful list"/></custom-block></script><script x="47" y="328"><block s="doSetVar"><l>awful list</l><block s="reportNewList"><list><l>1</l><l>7</l><l>8</l><l>9</l><l>11</l><l>12</l><l>21</l><l>22</l><l>23</l><l>24</l><l>73</l><l>73</l><l>96</l><l>99</l></list></block></block><block s="doSetVar"><l>unsorted list</l><block s="reportNewList"><list><l>20</l><l>12</l><l>3</l><l>100</l><l>50</l><l>12</l></list></block></block></script><script x="47" y="122"><custom-block s="position of number %n in sorted list %l"><l>11</l><block var="awful list"/></custom-block></script><script x="37" y="217"><custom-block s="are the numbers distinct? %l"><block var="awful list"/></custom-block></script></scripts></sprite><watcher var="guess" style="normal" x="10" y="10" color="243,118,29"/><watcher var="unsorted list" style="normal" x="15" y="133.000004" color="243,118,29" extX="80" extY="70" hidden="true"/><watcher var="awful list" style="normal" x="8" y="35.000001999999995" color="243,118,29" extX="80" extY="70" hidden="true"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="position of number %&apos;number&apos; in sorted list %&apos;data&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>guess</l><l>min</l><l>max</l></list></block><block s="doSetVar"><l>min</l><l>1</l></block><block s="doSetVar"><l>max</l><block s="reportStringSize"><block var="data"/></block></block><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="min"/><block var="max"/></block><l>2</l></block></block></block><block s="doUntil"><block s="reportEquals"><block s="reportListItem"><block var="guess"/><block var="data"/></block><block var="number"/></block><script><block s="doIf"><block s="reportGreaterThan"><block var="min"/><block var="max"/></block><script><block s="doReport"><l>0</l></block></script></block><block s="doIfElse"><block s="reportGreaterThan"><block s="reportListItem"><block var="guess"/><block var="data"/></block><block var="number"/></block><script><block s="doSetVar"><l>max</l><block s="reportDifference"><block var="guess"/><l>1</l></block></block></script><script><block s="doSetVar"><l>min</l><block s="reportSum"><block var="guess"/><l>1</l></block></block></script></block><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="min"/><block var="max"/></block><l>2</l></block></block></block></script></block><block s="doReport"><block var="guess"/></block></script></block-definition><block-definition s="position of number %&apos;number&apos; in unsorted list %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doFor"><l>i</l><l>1</l><block s="reportStringSize"><block var="data"/></block><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="data"/></block><block var="number"/></block><script><block s="doReport"><block var="i"/></block></script></block></script></block><block s="doReport"><l>Not in list</l></block></script></block-definition><block-definition s="Say position of number %&apos;num&apos; in sorted list %&apos;data&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>guess</l><l>low</l><l>high</l><l>counter</l></list></block><block s="doSetVar"><l>low</l><l>1</l></block><block s="doSetVar"><l>high</l><block s="reportStringSize"><block var="data"/></block></block><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="low"/><block var="high"/></block><l>2</l></block></block></block><block s="doSetVar"><l>counter</l><l>1</l></block><block s="doUntil"><block s="reportEquals"><block s="reportListItem"><block var="guess"/><block var="data"/></block><block var="num"/></block><script><block s="doIf"><block s="reportGreaterThan"><block var="low"/><block var="high"/></block><script><block s="doSayFor"><l>Not in list</l><l>2</l></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIfElse"><block s="reportGreaterThan"><block s="reportListItem"><block var="guess"/><block var="data"/></block><block var="num"/></block><script><block s="doSetVar"><l>high</l><block s="reportDifference"><block var="guess"/><l>1</l></block></block></script><script><block s="doSetVar"><l>low</l><block s="reportSum"><block var="guess"/><l>1</l></block></block></script></block><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="low"/><block var="high"/></block><l>2</l></block></block></block><block s="doChangeVar"><l>counter</l><l>1</l></block></script></block><block s="doSayFor"><block s="reportJoinWords"><list><l>Position is </l><block var="guess"/><l>, found in </l><block var="counter"/><l> guesses</l></list></block><l>5</l></block></script></block-definition><block-definition s="duplicates in %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block s="reportNewList"><list></list></block></block><block s="doRepeat"><block s="reportListLength"><block var="data"/></block><script><block s="doIf"><block s="reportListContainsItem"><block s="reportCDR"><block var="data"/></block><block s="reportListItem"><l>1</l><block var="data"/></block></block><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="data"/></block><block var="result"/></block></script></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="are the numbers distinct? %&apos;List&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doFor"><l>pos #</l><l>1</l><block s="reportListLength"><block var="List"/></block><script><block s="doIf"><block s="reportLessThan"><block var="pos #"/><block s="reportListLength"><block var="List"/></block></block><script><block s="doFor"><l>p</l><block s="reportSum"><block var="pos #"/><l>1</l></block><block s="reportListLength"><block var="List"/></block><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><block var="pos #"/><block var="List"/></block><block s="reportListItem"><block var="p"/><block var="List"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block></script></block></script></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition></blocks><variables><variable name="guess"><l>0</l></variable><variable name="awful list"><list struct="atomic" id="367">1,7,8,9,11,12,21,22,23,24,73,73,96,99</list></variable><variable name="unsorted list"><list struct="atomic" id="368">20,12,3,100,50,12</list></variable></variables></project><media name="U5L1-Analyzing and Improving Searches" app="Snap! 5.4, http://snap.berkeley.edu" version="1"></media></snapdata>