<snapdata remixID="9176959"><project name="U5L1 - Algorithms" app="Snap! 5.4, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAE30lEQVR4Xu3dzUucVxiG8WckYhe6SghtEQMVPxZCFUQdEIIghUYSUBdClBRR6Fpwo+AfoNCFK0ERsgzoqjW4cKESEIygExfiB9HQbqogWKGgaOct74GRTqdJJ9jmnnO43ATJjM851/PDiVmMiSiKIuODAqICCQCKyjPWFQAgEKQFACjNz3AAYkBaAIDS/AwHIAakBQAozc9wAGJAWgCA0vwMByAGpAUAKM3PcABiQFoAgNL8DAcgBqQFACjNz3AAYkBaAIDS/AwHIAakBQAozc9wAGJAWgCA0vwMByAGpAUAKM3PcABiQFoAgNL8DAcgBqQFACjNz3AAYkBaAIDS/AwHIAakBQAozc9wAGJAWgCA0vwMByAGpAUAKM3PcABiQFoAgNL8DAcgBqQFACjNz3AAYkBaAIDS/AwHIAakBQAozc9wAGJAWgCA0vwMByAGpAUAKM3PcABiQFoAgNL8DAcgBqQFACjNz3AAYkBaAIDS/AwHIAakBQAozc9wAGJAWgCA78nf2NhoQ0ND1tvbK11Q6MMB+IENd3Z23vzt4eGhzc/PW1VVVegmPun9APgvuf+KMPPQoqIiu7y8tIWFhU+6rBCHARCAUtcA/IiX4Lm5OauurpYuLLThAOSHEKlpAErzMxyAGJAWAKA0P8MBiAFpAQBK8zMcgBiQFgCgND/DAYgBaQEASvMzHIAYkBYAoDQ/wwGIAWkBAErzMxyAGJAWAKA0P8MBiAFpAQBK8zMcgBiQFgCgND/DAYgBaQEASvMzHIAYkBYAoDQ/wwGIAWkBAErzMxyAGJAWAKA0P8MBiAFpAQBK8zP8HwFubW3ZyspKQdWpqKiw7u7ugjoTh7l9gRyAi4uL7m1ooyiyRCLxv/355ef37YcnX9m9z6IP3iKRMHs689qOf0+781xfX1ttbe3tb85XKIgCWQDX19ettLTULTrzkYH4sZ9nnpdOpy1+S9u/P/9o+YU9/Pl5doR4bpQLsjj5zN5WP3WPjb9eXV1dQcTjELcvkAVwbGzMurq6HMCjoyP3kpdMJq2+vt6Oj4+tr6/PJiYmrKGhweKX6Y6ODjs4OLh54+74856eHhsZGbH+/n73mOHhYaupqbGpqSlbXl62trY229zctP2X0/boPPs9lu98/cSu3/yYc6sY4M6D7pvvyPF8PsIokAVwcnLSWlpa3KJnZ2etvLzc2tvbbXd319bW1mx6etoGBwdtZ2fHLi4u7Orqyr1l7fn5uS0tLdnGxobFL+Grq6vupXt8fNxGR0ettbXV/cqD7e1tV62kpMTeLT3PAVj88HtLH67bH7+ksurGAFNfPL4B2NzcHEZ9bmFZAE9OTmxvby/vLPFL9szMjPv1BWdnZ3k/L37gr69e2Le//ZTXc4qT39nru9+4x+7v79vAwEBez+NBhV8g54eQ+LtcZWWlO3nmh5DMNf7Lz8vKyqypqSmvQqlUyk5PT90/C+LvwHyEU4D/Bwxnl17eBIBeri2cQwMwnF16eRMAerm2cA4NwHB26eVNAOjl2sI5NADD2aWXNwGgl2sL59AADGeXXt4EgF6uLZxDAzCcXXp5EwB6ubZwDg3AcHbp5U0A6OXawjk0AMPZpZc3AaCXawvn0AAMZ5de3gSAXq4tnEMDMJxdenkTAHq5tnAODcBwdunlTf4EKJn4t7b94fEAAAAASUVORK5CYII=</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,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+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+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+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+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCC</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="20" y="20"><custom-block s="Remove Duplicates from %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>2</l><l>3</l><l>4</l></list></block></custom-block></script><script x="20" y="57"><custom-block s="Position of number %n in unsorted list %l"><l>9</l><block s="reportNewList"><list><l>6</l><l>2</l><l>7</l><l>3</l><l>9</l></list></block></custom-block></script><script x="20" y="94"><custom-block s="Position of number %n in sorted list %l"><l>4</l><block s="reportNewList"><list><l>1</l><l>2</l><l>2</l><l>3</l><l>4</l></list></block></custom-block></script><script x="20" y="131"><custom-block s="Are the number of %l distinct"><block s="reportNewList"><list><l>1</l><l>2</l><l>2</l><l>3</l><l>4</l></list></block></custom-block></script><script x="20" y="168"><custom-block s="Duplicates in %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>2</l><l>3</l><l>4</l></list><comment w="90" collapsed="false">COMMENTS ARE IN EACH BLOCK!!.</comment></block></custom-block></script></scripts></sprite><watcher var="position of number" style="normal" x="10" y="10" color="243,118,29" hidden="true"/><watcher var="average of list" style="normal" x="10" y="277.000004" color="243,118,29"/></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="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="number"/></block><script><block s="doFor"><l>position number</l><l>1</l><block s="reportListLength"><block var="list"/></block><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><block var="position number"/><block var="list"/></block><block var="number"/></block><script><block s="doReport"><block var="position number"/></block></script></block></script></block></script><script><block s="doReport"><l>Cannot find that number.</l></block></script></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="doSayFor"><custom-block s="position of number %n in unsorted list %l"><block var="number"/><block var="list"/></custom-block><l>2</l></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>maximum number</l><l>minimum number</l><l>position</l></list></block><block s="doSetVar"><l>minimum number</l><l>1</l></block><block s="doSetVar"><l>maximum number</l><block s="reportListLength"><block var="list"/></block></block><block s="doSetVar"><l>position</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="maximum number"/><block var="minimum number"/></block><l>2</l></block></block></block><block s="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="number"/></block><script><block s="doUntil"><block s="reportEquals"><block s="reportListItem"><block var="position"/><block var="list"/></block><block var="number"/></block><script><block s="doIf"><block s="reportLessThan"><block s="reportListItem"><block var="position"/><block var="list"/></block><block var="number"/></block><script><block s="doSetVar"><l>minimum number</l><block s="reportSum"><block var="position"/><l>1</l></block></block><block s="doSetVar"><l>position</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="maximum number"/><block var="minimum number"/></block><l>2</l></block></block></block></script></block><block s="doIf"><block s="reportGreaterThan"><block s="reportListItem"><block var="position"/><block var="list"/></block><block var="number"/></block><script><block s="doSetVar"><l>maximum number</l><block s="reportDifference"><block var="position"/><l>1</l></block></block><block s="doSetVar"><l>position</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="maximum number"/><block var="minimum number"/></block><l>2</l></block></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportListItem"><block var="position"/><block var="list"/></block><block var="number"/></block><script><block s="doReport"><block var="position"/></block></script></block></script></block></script><script><block s="doReport"><l>0</l></block></script></block></script><scripts><script x="541.0000030000001" y="205.00000300000005"><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="maximum number"/><block var="minimum number"/></block><l>2</l></block></block></block><block s="doSetVar"><l>guess</l><block s="reportRound"><block s="reportQuotient"><block s="reportSum"><block var="maximum number"/><block var="minimum number"/></block><l>2</l></block></block></block></script><script x="564.0000009999999" y="430.00000100000005"><block s="doFor"><l>position number</l><l>1</l><block s="reportListLength"><block var="list"/></block><script><block s="doIf"><block s="reportLessThan"><block var="number"/><block var="average of list"/></block><script><block s="doSetVar"><l>maximum number</l><block var="average of list"/></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="number"/><block var="average of list"/></block><script></script></block><block s="doIf"><block s="reportEquals"><block s="reportListItem"><block var="position number"/><block var="list"/></block><block var="number"/></block><script><block s="doReport"><block var="position number"/></block></script></block></script></block></script></scripts></block-definition><block-definition s="min of list %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>min</l></list></block><block s="doSetVar"><l>min</l><custom-block s="average %l"><block var="list"/></custom-block></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doIf"><block s="reportLessThan"><block var="item"/><block var="min"/></block><script><block s="doSetVar"><l>min</l><block var="item"/></block></script></block></script></block><block s="doReport"><block var="min"/></block></script></block-definition><block-definition s="max of list %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>max</l></list></block><block s="doSetVar"><l>max</l><l>0</l></block><block s="doForEach"><l>item</l><block var="list"/><script><block s="doIf"><block s="reportLessThan"><block var="max"/><block var="item"/></block><script><block s="doSetVar"><l>max</l><block var="item"/></block></script></block></script></block><block s="doReport"><block var="max"/></block></script></block-definition><block-definition s="average %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportQuotient"><block s="reportCombine"><block var="list"/><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block></block><block s="reportListLength"><block var="list"/></block></block></block></script></block-definition><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="doFor"><l>Position</l><l>1</l><block s="reportListLength"><block var="List"/></block><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><block var="Position"/><block var="List"/></block><block var="number"/></block><script><block s="doReport"><block var="Position"/></block></script></block></script><comment w="90" collapsed="false">The code will examine the numbers from one to how many numbers there are in the list. If the postition of the list is equal to the number to user inputted, it will then report the position number of the number the user requested to see. If the number is not in the list, it will report &quot;that number is not in the list.&quot;</comment></block><block s="doReport"><l>That number is not in the list</l></block></script></block-definition><block-definition s="Position of number %&apos;Number&apos; in sorted list %&apos;list&apos;" type="reporter" category="lists"><comment w="117" collapsed="false">If the list contains the number the user is looking for, it will then start the following code. </comment><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>Item Number</l></list><comment w="139" collapsed="false">The script variable is used to report the item number that the user is looking for. If the average number of the list is greater than the number the user is looking for,it will then make a new list starting from 1 to the new highest number of the list. it will then change the item number by 1 until the code gets the number the user is looking for.</comment></block><block s="doIf"><block s="reportEquals"><block s="reportGreaterThan"><custom-block s="average %l"><block var="list"/></custom-block><block var="Number"/></block><block s="reportBoolean"><l><bool>true</bool></l></block></block><script><block s="doSetVar"><l>Item Number</l><l>0</l></block><block s="doForEach"><l>item</l><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportLessThan"><l></l><custom-block s="average %l"><block var="list"/></custom-block></block></autolambda><list></list></block><block var="list"/></block><script><block s="doChangeVar"><l>Item Number</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block var="item"/><block var="Number"/></block><script><block s="doReport"><block var="Item Number"/></block></script></block></script></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLessThan"><custom-block s="average %l"><block var="list"/></custom-block><block var="Number"/></block><block s="reportBoolean"><l><bool>true</bool></l></block><comment w="134" collapsed="false">If the average of the list is less than the number is the user is looking for, it will then make a new list and  It will change the item number by one until the item number is equal to the number the user is looking for, which will then report the item number. </comment></block><script><block s="doSetVar"><l>Item Number</l><l>0</l></block><block s="doForEach"><l>item</l><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportGreaterThan"><l></l><custom-block s="average %l"><block var="list"/></custom-block></block></autolambda><list></list></block><block var="list"/></block><script><block s="doChangeVar"><l>Item Number</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block var="item"/><block var="Number"/></block><script><block s="doReport"><block s="reportSum"><block var="Item Number"/><block s="reportListLength"><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportLessThan"><l></l><custom-block s="average %l"><block var="list"/></custom-block></block></autolambda><list></list></block><block var="list"/></block></block></block></block></script></block></script></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportEquals"><custom-block s="average %l"><block var="list"/></custom-block><block var="Number"/></block><block s="reportBoolean"><l><bool>true</bool></l></block><comment w="90" collapsed="false">If the average number of the list is equal to the number, it will then  report the item number.</comment></block><script><block s="doSetVar"><l>Item Number</l><l>0</l></block><block s="doForEach"><l>item</l><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportGreaterThan"><l></l><custom-block s="average %l"><block var="list"/></custom-block></block></autolambda><list></list></block><block var="list"/></block><script><block s="doChangeVar"><l>Item Number</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block var="item"/><block var="Number"/></block><script><block s="doReport"><block var="Item Number"/></block></script></block></script></block></script></block></script><script><block s="doReport"><l>0</l><comment w="90" collapsed="false">The report 0 will only happen if the number the user is looking for is not in the list.</comment></block></script></block></script></block-definition><block-definition s="Are the number of %&apos;list&apos; distinct" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>T/F</l><l>New List</l></list><comment w="141" collapsed="false">The script variable is used to determine if it is distinct and to make a new list.</comment></block><block s="doSetVar"><l>New List</l><block var="list"/></block><block s="doSetVar"><l>T/F</l><block s="reportNewList"><list></list></block></block><block s="doRepeat"><block s="reportListLength"><block var="list"/><comment w="90" collapsed="false">The code here will repeat X amount of times depending on how many items are in the list. If all the numbers but the first numbers contain the same number, it will add 1 to T/F.</comment></block><script><block s="doIfElse"><block s="reportListContainsItem"><block s="reportCDR"><block var="New List"/></block><block s="reportListItem"><l>1</l><block var="New List"/></block></block><script><block s="doAddToList"><l>1</l><block var="T/F"/></block></script><script><block s="doAddToList"><l>0</l><block var="T/F"/></block></script></block><block s="doSetVar"><l>New List</l><block s="reportCDR"><block var="New List"/></block></block></script></block><block s="doIfElse"><block s="reportListContainsItem"><block var="T/F"/><l>1</l><comment w="90" collapsed="false">If T/F contains 1, then the numbers ae not distinct. If it doesn&apos;t contain 1, it is distinct.</comment></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block></script></block-definition><block-definition s="Duplicates in %&apos;List&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><custom-block s="Are the number of %l distinct"><block var="List"/></custom-block><block s="reportBoolean"><l><bool>false</bool></l></block></block><script><block s="doDeclareVariables"><list><l>Duplicates</l><l>New List</l></list><comment w="120" collapsed="false">The script variables will contain the duplicates and have a new list.</comment></block><block s="doSetVar"><l>Duplicates</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>New List</l><block var="List"/></block><block s="doForEach"><l>item</l><block var="New List"><comment w="116" collapsed="false">If the first item of the list contains any numbers in the rest of the list, it will add the item to the duplicate and repeat it for each item and will make a new list to repeat for every other item.</comment></block><script><block s="doIf"><block s="reportListContainsItem"><block s="reportCDR"><block var="New List"/></block><block s="reportListItem"><l>1</l><block var="New List"/></block></block><script><block s="doAddToList"><block var="item"/><block var="Duplicates"/></block></script></block><block s="doSetVar"><l>New List</l><block s="reportCDR"><block var="New List"/></block></block></script></block><block s="doReport"><block var="Duplicates"><comment w="167" collapsed="false">This will report the duplicates</comment></block></block></script><script><block s="doReport"><l>No Duplicates</l><comment w="128" collapsed="false">If there is no duplicates, it will report no duplicates.</comment></block></script></block></script></block-definition><block-definition s="Remove Duplicates from %&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>New List</l></list></block><block s="doSetVar"><l>New List</l><block var="List"/></block><block s="doRepeat"><block s="reportListLength"><custom-block s="Duplicates in %l"><block var="List"/><comment w="90" collapsed="false">This will repeat x amount of times depending on how many duplicates there are. This code will delete each duplicate in the list and will make a new list where there isn&apos;t a duplicate.</comment></custom-block></block><script><block s="doDeleteFromList"><custom-block s="Position of number %n in unsorted list %l"><block s="reportListItem"><l>1</l><custom-block s="Duplicates in %l"><block var="List"/></custom-block></block><block var="List"/></custom-block><block var="New List"/></block></script></block><block s="doReport"><block var="New List"/></block></script></block-definition></blocks><variables><variable name="position of number"><l>1.5</l></variable><variable name="average of list"><l>3</l></variable><variable name="new avg"><l>33</l></variable></variables></project><media name="U5L1 - Algorithms" app="Snap! 5.4, http://snap.berkeley.edu" version="1"></media></snapdata>