<snapdata remixID="9205547"><project name="U5L1-Algorithms" app="Snap! 5.4, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAACeklEQVR4Xu3XsWnDUABF0W/tYk3gRVxrCs8ll55He7iSIZCQJglpfEEctRI8dP8BodO+7/twKRAVOAEYlTf7UQBAENICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEAf8h/uVzG7XYby7KkB3T0cQB/OeHr9fp1d9u2cb/fx/l8PrqJt74fgH/k/o7w89Fpmsbz+RyPx+Oth3XEMQABTF0D+I9P8LquY57n9MCONg6gn5DUNIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3/gLXCfyohseIjQAAAABJRU5ErkJggg==</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,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="position of number %n In unsorted list %l"><l>100</l><block s="reportNewList"><list><l>20</l><l>12</l><l>3</l><l>100</l><l>50</l><l>12</l><l>20</l></list></block></custom-block></script><script x="20" y="57"><custom-block s="position of number %n In sorted list %l"><l>96</l><custom-block s="awful list"></custom-block></custom-block></script><script x="20" y="91"><custom-block s="are the numbers of %l distinct?"><block s="reportNewList"><list><l>30</l><l>13</l><l>3</l><l>100</l><l>50</l><l>12</l><l>20</l></list></block></custom-block></script><script x="20" y="128"><custom-block s="remove duplicates from %l"><block s="reportNewList"><list><l>20</l><l>12</l><l>3</l><l>100</l><l>50</l><l>12</l><l>20</l></list></block></custom-block></script><script x="20" y="165"><custom-block s="duplicates in %l"><block s="reportNewList"><list><l>20</l><l>12</l><l>3</l><l>100</l><l>50</l><l>12</l><l>20</l></list></block></custom-block></script></scripts></sprite></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"/><comment w="280" collapsed="false">The code checks if a list contains the inputted number, so that if it DOES, it will scan the list from the 1st item to how long the list is, and then determine if the detected position of list found equals the inputted number, then it will report the position. However, if the inputted number is not found in the list, it will just report &quot;Not in list&quot; instead.</comment></block><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></block></script><script><block s="doReport"><l>Not in list.</l></block></script></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="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="number"/></block><script><block s="doDeclareVariables"><list><l>item number</l></list></block><block s="doIf"><block s="reportEquals"><block s="reportGreaterThan"><custom-block s="average of list %l"><block var="list"/></custom-block><block var="number"/></block><block s="reportBoolean"><l><bool>true</bool></l></block><comment w="326" collapsed="false">The code here will see if the average of the list is greater than the inputted number. If that&apos;s the case, then the code will initialize the item number by resetting it to 0, so that it can increase it by 1 for each item in the list that is less than the average of the list , until it matches the inputted number. It will then finally 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="reportLessThan"><l></l><custom-block s="average of list %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 of list %l"><block var="list"/></custom-block><block var="number"/></block><block s="reportBoolean"><l><bool>true</bool></l></block><comment w="326" collapsed="false">The code here will see if the average of the list is less than the inputted number. If that&apos;s the case, then the code will initialize the item number by resetting it to 0, so that it can increase it by 1 for each item in the list that is greater than the average of the list, until it matches the inputted number. It will then finally report the item number. However, in this case, the code in addition will have to add the item number to the number of items that are less than the average of the list, so that the true item number of the inputted number can be reported.</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 of list %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 of list %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 of list %l"><block var="list"/></custom-block><block var="number"/></block><block s="reportBoolean"><l><bool>true</bool></l></block><comment w="326" collapsed="false">The code here will see if the average of the list is equal to the inputted number. If that&apos;s the case, then the code will initialize the item number by resetting it to 0, so that it can increase it by 1 for each item in the list until it matches the inputted number. The code 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 var="list"/><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>Not in list.</l></block></script></block></script></block-definition><block-definition s="average of list %&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="reportMonadic"><l><option>floor</option></l><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></block></script></block-definition><block-definition s="awful list" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><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></script></block-definition><block-definition s="are the numbers 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>true or false</l><l>new list</l></list></block><block s="doSetVar"><l>true or false</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>new list</l><block var="list"/></block><block s="doRepeat"><block s="reportListLength"><block var="list"/></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="true or false"/></block></script><script><block s="doAddToList"><l>0</l><block var="true or false"/></block></script><comment w="218" collapsed="false">This code here sees if the number of a list is distinct by checking if all the numbers of the list are different. In order to do this, the code will repeat a process of checking if the rest of the list matches the first item of the list. However, each time it changes the list so that the first item of the list gets removed. That way, the code will be able to run through the entire list. However, if the code DOES detect a duplicate number, it will then add 1 to the &quot;true or false&quot; variable. If the &quot;true or false&quot; variable contains 1, it will report false, and true otherwise. </comment></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="true or false"/><l>1</l></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 numbers 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></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"/><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"><block var="item"/><block var="duplicates"/></block></script><script><custom-block s="Do nothing"></custom-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"/></block></script><script><block s="doReport"><l>No duplicates.</l></block></script><comment w="268.0000020000002" collapsed="false">This code will first determine that the numbers of a list are not distinct. Then, the code will initialize the variables &quot;duplicates&quot; and &quot;new list.&quot; The code will use &quot;new list&quot; to run through each item of the code in order to check what items match each other through the &quot;all but first of&quot; block. Wherever the code detects a matching item, it will add it to duplicates, and then finally report the duplicates. Also, if the code doesn&apos;t determine that are duplicates, it will just report &quot;No duplicates&quot; instead.</comment></block></script></block-definition><block-definition s="Do nothing" type="command" category="motion"><header></header><code></code><translations></translations><inputs></inputs></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"/></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><comment w="212" collapsed="false">This code removes duplicates from a list by first creating a new list variable. Then, it will repeat for all the duplicates in the list, a process of deleting the 1st number of the duplicates in that list. That way, all the reported duplicated items will get deleted, and the new list without those duplicates will be reported.</comment></block><block s="doReport"><block var="new list"/></block></script></block-definition></blocks><variables></variables></project><media name="U5L1-Algorithms" app="Snap! 5.4, http://snap.berkeley.edu" version="1"></media></snapdata>