<snapdata remixID="13499671"><project name="Lab: Lists + Loops" app="Snap! 10.4.5, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAArtJREFUeF7t1zFqomEYRtEvlaVbcDcuIGUwnZVgndq1uJDU7sTeoIjiEIuBYUhKL8ixFh7++x788eV2u92GjwJRgRcAo/Jm7wUABCEtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYAMM1vHEAG0gIApvmNA8hAWgDANL9xABlICwCY5jcOIANpAQDT/MYBZCAtAGCa3ziADKQFAEzzGweQgbQAgGl+4wAykBYA8If82+12fH19jfl8PmazWXqkZx4H8Ifrnk6nsVwux+FwGPv9fry/v4/r9TpWq9Uze3j4swH4S/Ldbjc+Pj7GdDr951vH4/EOcjKZjNfX14cf7ZkGAfzlmp+fn2Oz2fwH8Hw+j8Vicf9FfHt7eyYPD38WAH95BX8ju1wuf1/B3/DW6/XDj/TMgwD6E5L6BjDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zG/wDWjh23ucecRwAAAABJRU5ErkJggg==</thumbnail><scenes select="1"><scene name="Lab: Lists + Loops"><notes></notes><palette><category name="Lab: Lists + Loops" color="0,116,143,1"/></palette><hidden></hidden><headers></headers><code></code><blocks><block-definition s="add all numbers from num1: %&apos;num1&apos; to num2: %&apos;num2&apos;" type="reporter" category="Lab: Lists + Loops"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="report only even numbers from list: %&apos;input&apos;" type="reporter" category="Lab: Lists + Loops"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="add start num: %&apos;start&apos; until &gt; than stop num: %&apos;stop&apos; and is odd" type="reporter" category="Lab: Lists + Loops"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="is num: %&apos;num&apos; prime?" type="predicate" category="Lab: Lists + Loops"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="report only prime numbers from list: %&apos;input&apos;" type="reporter" category="Lab: Lists + Loops"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="report the duplicates in list: %&apos;input&apos;" type="reporter" category="Lab: Lists + Loops"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition></blocks><primitives></primitives><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="false" inheritance="true" sublistIDs="false" id="30"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAADoVJREFUeF7t1cEJAAAIxDDdf2m3sJ+4wEEQuuMIECBAgACBd4F9XzRIgAABAgQIjAB7AgIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+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+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECByxcQFpoRMBzwAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="31"></list></costumes><sounds><list struct="atomic" id="32"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><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="37"><costumes><list struct="atomic" id="38"></list></costumes><sounds><list struct="atomic" id="39"></list></sounds><blocks></blocks><variables></variables><scripts><script x="16" y="10"><custom-block s="add all numbers from num1: %n to num2: %n"><l></l><l></l><comment w="367" collapsed="false">Add all the numbers together in the range from num1 to num2. The starting number will be num1, and you will continuously add numbers until you reach num2 (the final number to add)&#xD;&#xD;Input: 2 Numbers&#xD;Output: Number&#xD;&#xD;Ex: add all numbers from num1: &quot;1&quot; to num2: &quot;5&quot; will add 1 + 2 + 3 + 4 + 5. This will return 15.&#xD;&#xD;Ex: add all numbers from num1: &quot;3&quot; to num2: &quot;7&quot; will add 3 + 4 + 5 + 6 + 7. This will return 25.&#xD;&#xD;Ex: add all numbers from num1: &quot;-4&quot; to num2: &quot;2&quot; will add -4 + -3 + -2 + -1 + 0 + 1 + 2. This will return -7..&#xD;&#xD;Ex: add all numbers from num1: &quot;2&quot; to num2: &quot;2&quot; will not add but start and end at 2. This will return 2</comment></custom-block></script><script x="16" y="283"><custom-block s="report only even numbers from list: %l"><l/><comment w="437" collapsed="false">Report a new list that only contains numbers that are even (i.e. divisible by 2). You may use the &quot;mod&quot; block. Mod stands for modulus. Given two numbers, a (the dividend) and b (the divisor), the modulus operation a mod b returns the remainder when a is divided by b. For example, 4 mod 2 is 0 since 4 is divisible by 2. 4 mod 3 is 1. &#xD;&#xD;Input: List&#xD;Output: List&#xD;&#xD;Ex: report only even numbers from list &quot;[1, 2, 3, 4, 5]&quot;. This will return the list with [2, 4].&#xD;&#xD;Ex: report only even numbers from list &quot;[2, 4, 6, 8]&quot;. This will return the list with [2, 4, 6, 8].&#xD;&#xD;Ex: report only even numbers from list &quot;[-2, -4, -6, -8]&quot;. This will return the list with [-2, -4, -6, -8].&#xD;&#xD;Ex: report only even numbers from list &quot;[1, 3, 5, 7]&quot;. This will return an empty list (a list containing no items) [].&#xD;</comment></custom-block></script><script x="16" y="531.9999999999995"><custom-block s="add start num: %n until &gt; than stop num: %n and is odd"><l></l><l></l><comment w="328" collapsed="false">Add numbers continously starting at a start number until the added numbers are greater than the stop number AND the added numbers are odd. Both of these conditions need to be true until the loop terminates. Each time the loop is iterated through, the output number will be added to by a number incrementing by 1 starting at the start num. For this function, you will need the &quot;repeat until&quot; block. You are NOT allowed to use the &quot;for i&quot; loop OR the &quot;for each item&quot; loop.&#xD;&#xD;Inputs: 2 Numbers&#xD;Output: Number&#xD;Restrictions: Cannot use &quot;for each item&quot; or &quot;for i&quot; blocks. Must use &quot;repeat until&quot;&#xD;&#xD;Ex: add start num: &quot;1&quot; until &gt; than stop num: &quot;2&quot; and is odd. The following numbers will be added: 1 + 2. This will return 3.&#xD;&#xD;Ex: add start num: &quot;1&quot; until &gt; than stop num: &quot;7&quot; and is odd. The following numbers will be added: 1 + 2 + 3 + 4 + 5. This will return 15.&#xD;&#xD;Ex: add start num: &quot;3&quot; until &gt; than stop num: &quot;6&quot; and is odd. The following numbers will be added: 3 + 4. This will return 7.</comment></custom-block></script><script x="16" y="858.9999999999995"><custom-block s="is num: %n prime?"><l></l><comment w="326" collapsed="false">Evaluate the number and return true if the number is prime, and return false is the number is NOT prime. To do this, you will need to check if all the numbers smaller than the given number and greater than 1 are divisible by the given number. Note, a prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. 0 and 1 are neither prime nor composite, so the domain will be greater than 1.&#xD;&#xD;Input: Number (greater than 2)&#xD;Output: Boolean&#xD;&#xD;Ex: is num: &quot;17&quot; prime?. This will return true.&#xD;&#xD;Ex: is num: &quot;10&quot; prime?. This will return false.&#xD;&#xD;Ex: is num: &quot;2&quot; prime?. This will return true.&#xD;</comment></custom-block></script><script x="16" y="1084.000000000001"><custom-block s="report only prime numbers from list: %l"><l/><comment w="339" collapsed="false">Report a new list that only contains prime numbers. This function should filter out any non-prime numbers from the input list. You can and should use the &quot;is num: _ prime&quot; block you just made! The order of the items should still be preserved - just filtered.&#xD;&#xD;Input: List&#xD;Output: List&#xD;&#xD;Ex: report only prime number from list: &quot;[2, 3, 4, 5]&quot;: This will return [2, 3, 5].&#xD;&#xD;Ex: report only prime number from list: &quot;[11, 7, 6, 0]&quot;: This will return [11, 7].&#xD;&#xD;Ex: report only prime number from list: &quot;[2, 4, 6, 8]&quot;: This will return [2]</comment></custom-block></script><script x="16" y="1297.0000000000023"><custom-block s="report the duplicates in list: %l"><l/><comment w="365" collapsed="false">Write a function that takes a list of integers and returns a list of all the integers that appear more than once in the input list. The returned list should not contain any duplicates. If there are no duplicates, then the function should report any empty list. The order of the items should still be preserved - just filtered. There is a built-in function in Snap! called &quot;uniques&quot;. You are NOT allowed to use this function.&#xD;&#xD;Input: List&#xD;Output: List&#xD;Restrictions: Cannot use &quot;uniques&quot; block&#xD;&#xD;Ex: report the duplicates in list: &quot;[1, 2, 1, 3, 2]&quot;. This will return: [1, 2].&#xD;&#xD;Ex: report the duplicates in list: &quot;[4, 4, 3, 10, 33, 4]&quot;. This will return: [4].&#xD;&#xD;Ex: report the duplicates in list: &quot;[7, 2, 3, 2, 7]&quot;. This will return: [7, 2].&#xD;&#xD;Ex: report the duplicates in list: &quot;[1, 4, 6, 3]&quot;. This will return an empty list.</comment></custom-block></script></scripts></sprite></sprites></stage><variables></variables></scene></scenes></project><media name="Lab: Lists + Loops" app="Snap! 10.4.5, https://snap.berkeley.edu" version="2"></media></snapdata>