<snapdata remixID="9775528"><project name="U2L4-MathLibraryKM/JX" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes>This program was done by both Junze Xu and Ken Mori</notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAADOUlEQVR4Xu3XQUpjYRCF0V9RcOIW3I8bEHSgBtyJ28kmsh5x4iQEB6/BWQ+U5nLpAjkZp6rIeR88crZt27Z8CAwJnAlwSN7ZLwEBCmFUQICj/I4LUAOjAgIc5XdcgBoYFRDgKL/jAtTAqIAAR/kdF6AGRgUEOMrvuAA1MCogwFF+xwWogVEBAY7yOy5ADYwKCHCU33EBamBUQICj/I4LUAOjAgIc5XdcgBoYFRDgKL/jAtTAqIAAR/kdF6AGRgUEOMrvuAA1MCogwFF+xwWogVEBAY7yOy5ADYwKCHCU33EBamBUQICj/I4LUAOjAgIc5XdcgBoYFRDgKL/jAtTAqIAAR/kdF6AGRgUEOMrvuAA1MCogwFF+xwWogVEBAY7yOy5ADYwKCHCU33EBamBUQICj/I4LUAOjAgIc5XdcgBoYFRDgKL/jAtTAqIAAv+Hf7/fr/f193d7erpubm9GH9JuPC/Cbp/vx8bFeXl7W5+fnent7W/f39+vi4mI9PT2tq6ur39zEf/1tAvyB+3A4rNfX13V9ff3Xt47H43p+fl7btn2F6ZMLCDAI8HQ6rcfHx3V+fr7u7u5yfZNLgP/4Cn54ePh6Be92u3V5eSmdkoAA/QkppZStEWDmZqokIMASpDWZgAAzN1MlAQGWIK3JBASYuZkqCQiwBGlNJiDAzM1USUCAJUhrMgEBZm6mSgICLEFakwkIMHMzVRIQYAnSmkxAgJmbqZKAAEuQ1mQCAszcTJUEBFiCtCYTEGDmZqokIMASpDWZgAAzN1MlAQGWIK3JBASYuZkqCQiwBGlNJiDAzM1USUCAJUhrMgEBZm6mSgICLEFakwkIMHMzVRIQYAnSmkxAgJmbqZKAAEuQ1mQCAszcTJUEBFiCtCYTEGDmZqokIMASpDWZgAAzN1MlAQGWIK3JBASYuZkqCQiwBGlNJiDAzM1USUCAJUhrMgEBZm6mSgICLEFakwkIMHMzVRIQYAnSmkxAgJmbqZKAAEuQ1mQCAszcTJUEBFiCtCYTEGDmZqokIMASpDWZgAAzN1MlAQGWIK3JBASYuZkqCQiwBGlNJiDAzM1USUCAJUhrMgEBZm6mSgJ/AE38F7dMeMlrAAAAAElFTkSuQmCC</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" hyperops="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"><block s="reportModulus"><l>21</l><l>2</l><comment w="90" collapsed="false">I notice that if you divide a number by another number and get a whole integer, it will report 0, but if not, then it will report 1.(Page 1 Section 2)</comment></block></script><script x="20" y="161.00000000000003"><custom-block s="is %n divisible by %n ?"><l>12</l><l>6</l><comment w="90" collapsed="false">Predicate that tells if the divided divided by the divisor has a remainder or not. If not, it will report ture. Otherwise, it will report false.(Page 1 Section 3)</comment></custom-block></script><script x="20" y="326"><custom-block s="even? %n"><l>10</l><comment w="90" collapsed="false">Predicate that tells if a number is even. If it is even, it will report true. Otherwise, it will report false.(Page 1 Section 4)</comment></custom-block></script><script x="20" y="454.9999999999998"><custom-block s="integer? %n"><l>2.5</l><comment w="90" collapsed="false">Predicate that tells if a number is an integer or not. If it is an integer, it will report true. Otherwise, it will report false. (Page 1 ITIT)</comment></custom-block></script><script x="20" y="596.0000000000001"><custom-block s="odd? %s"><l>3</l><comment w="90" collapsed="false">Predicate that tells if a number is odd. If it is odd, it will report true. Otherwise, it will report false.(Page 2 Section 3)</comment></custom-block></script><script x="20" y="724.9999999999999"><custom-block s="number of divisors %s"><l>49</l><comment w="90" collapsed="false">Predicate that tells the number of divisors in a number and displays them in a list.(Page 2 Section 4). Prime numbers exactly have 2 divisors because prime numbers are not divisible by any other number except 1 and itself.  Perfect squares have 3 divisors: 1, the square root of that number, and itself. This is because perfect squares form by multiplying the length twice, which in math is n^2. The &apos;n&apos; itself is a divisor for the perfect square(n^2). (Page 2 ITIT).</comment></custom-block></script><script x="20" y="1093.9999999999998"><custom-block s="minimum of %s and %s"><l>3</l><l>-4</l><comment w="90" collapsed="false">Predicate that tells the minimum number between 2 numbers(Page 3 Section 2) </comment></custom-block></script><script x="20" y="1199"><custom-block s="maximum of %n and %n"><l>6</l><l>4</l><comment w="90" collapsed="false">Predicate that tells the maximum number between 2 numbers. (Page 3 Section 2)</comment></custom-block></script><script x="20" y="1303.9999999999993"><custom-block s="maximum of list %l"><block s="reportNewList"><list><l>1</l><l>22</l><l>3</l><l>-4</l></list></block><comment w="90" collapsed="false">Predicate that reports back the maximum of a list.(Page 3 Section 3) </comment></custom-block></script><script x="20" y="1408.9999999999993"><custom-block s="miniumum of list %l"><block s="reportNewList"><list><l>1</l><l>22</l><l>3</l><l>-4</l></list></block><comment w="90" collapsed="false">Predicate that tells the minimum number of a list(Page 3 Section 3)</comment></custom-block></script><script x="20" y="1513.9999999999989"><custom-block s="sum of list %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>10</l></list><comment w="90" collapsed="false">Predicate that reports the sum of all the numbers in the list.(Page 3 Section 4)</comment></block></custom-block></script><script x="20" y="1620.9999999999989"><custom-block s="average of list %l"><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>4</l></list></block><comment w="90" collapsed="false">Predicate that tells the mean(average) of a list(Page 3 Section 5)</comment></custom-block></script><script x="20" y="1713.9999999999986"><custom-block s="greatest common divisor of %s %s"><l>10</l><l>40</l><comment w="90" collapsed="false">Predicate that tells the greatest common divisor between two numbers(Page 3 TIF)</comment></custom-block></script></scripts></sprite><watcher var="divisorsList" style="normal" x="10" y="10" color="243,118,29" hidden="true"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="is %&apos;n1&apos; divisible by %&apos;n2&apos; ?" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block s="reportModulus"><block var="n1"/><block var="n2"/></block><l>0</l></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><comment w="90" collapsed="false">If the dividened divided by the divisor equals 0(no remainder), it will report true. Otherwise it will report false.</comment></block></script></block-definition><block-definition s="even? %&apos;number&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><custom-block s="is %n divisible by %n ?"><block var="number"/><l>2</l></custom-block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><comment w="90" collapsed="false">if the number is divisible by 2 and has a remainder of 0, it will report true. Otherwise, it will report false.</comment></block></script></block-definition><block-definition s="integer? %&apos;number&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block s="reportRound"><block var="number"/></block><block var="number"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><comment w="90" collapsed="false">If the rounded number can equal to the number, it will report true. Otherwise it will report false.</comment></block></script></block-definition><block-definition s="is %&apos;inputValue&apos; between %&apos;lowerBound&apos; and %&apos;upperBound?&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportAnd"><block s="reportGreaterThan"><block var="inputValue"/><block var="lowerBound"/></block><block s="reportLessThan"><block var="inputValue"/><block var="upperBound?"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="%&apos;a&apos; ≤ %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="151.33333333333334" collapsed="false">Reports True if the left input is&#xD;less than or equal to the right input.&#xD;&#xD;Reports a Snap! Boolean, not an integer 0 or 1.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="%&apos;a&apos; ≥ %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="152.66666666666666" collapsed="false">Reports True if the left input is&#xD;greater than than or equal to&#xD;the right input.&#xD;&#xD;Reports a Snap! Boolean, not an integer 0 or 1.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="odd? %&apos;number&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIfElse"><custom-block s="even? %n"><block var="number"/></custom-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><comment w="90" collapsed="false">If number is even, report false. Otherwise, report true(Since it&apos;s odd)</comment></block></script></block-definition><block-definition s="number of divisors %&apos;number&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doHideVar"><l>divisorsList</l></block><block s="doSetVar"><l>divisorsList</l><block s="reportNewList"><list></list></block></block><block s="doFor"><l>i</l><l>1</l><block var="number"/><script><block s="doIf"><custom-block s="is %n divisible by %n ?"><block var="number"/><block var="i"/></custom-block><script><block s="doAddToList"><block var="i"/><block var="divisorsList"/></block></script></block></script><comment w="90" collapsed="false">For each number inside of the original number, if &apos;i&apos; is diviisble by the number, it will add it to the list and keep going. Otherwise, it will just keep going. After every number is tested, it will report out all the number of divisors in that number and display them.</comment></block><block s="doShowVar"><l>divisorsList</l></block><block s="doReport"><block s="reportListLength"><block var="divisorsList"/></block></block></script></block-definition><block-definition s="maximum of %&apos;number1&apos; and %&apos;number2&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportGreaterThan"><block var="number1"/><block var="number2"/></block><script><block s="doReport"><block var="number1"/></block></script><script><block s="doReport"><block var="number2"/></block></script><comment w="90" collapsed="false">If the first number is bigger than the second number, it will report the first number. Otherwise, it will report the second number</comment></block></script></block-definition><block-definition s="minimum of %&apos;number1&apos; and %&apos;number2&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportLessThan"><block var="number2"/><block var="number1"/></block><script><block s="doReport"><block var="number2"/></block></script><script><block s="doReport"><block var="number1"/></block></script><comment w="90" collapsed="false">If the second number is less than the first number, then it will report the second number. Otherwise it will report the first number.</comment></block></script></block-definition><block-definition s="maximum of list %&apos;numbers&apos;" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportCombine"><block var="numbers"/><block s="reifyReporter"><autolambda><custom-block s="maximum of %n and %n"><l></l><l></l></custom-block></autolambda><list></list></block></block><comment w="90" collapsed="false">Uses the combine function and the maximum of predicate to find the maximum number in the list</comment></block></script></block-definition><block-definition s="miniumum of list %&apos;numbers&apos;" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportCombine"><block var="numbers"/><block s="reifyReporter"><autolambda><custom-block s="minimum of %s and %s"><l></l><l></l></custom-block></autolambda><list></list></block></block><comment w="90" collapsed="false">Uses the combine function and the minimum of predicate to find the minimum number in the list</comment></block></script></block-definition><block-definition s="sum of list %&apos;numbers&apos;" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportCombine"><block var="numbers"/><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block></block><comment w="90" collapsed="false">Reports the sum of these numbers by using the combine function with the addition block.</comment></block></script></block-definition><block-definition s="average of list %&apos;numbers&apos;" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportQuotient"><block s="reportCombine"><block var="numbers"/><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block></block><block s="reportListLength"><block var="numbers"/></block><comment w="90" collapsed="false">To find the average, it first finds the sum of all the numbers in the list using the combine function with the addition block inside it. After it finds the sum, it divides it by the amount of numbers(length of the list) to find the average of the list</comment></block></block></script></block-definition><block-definition s="divisors of %&apos;number&apos;" type="predicate" category="variables"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><custom-block s="number of divisors %s"><block var="number"/></custom-block></block></script></block-definition><block-definition s="greatest common divisor of %&apos;num1&apos; %&apos;num2&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>max</l><l>min</l><l>index</l><l>gcd</l></list></block><block s="doIfElse"><block s="reportLessThan"><block var="num1"/><block var="num2"/></block><script><block s="doSetVar"><l>max</l><block var="num2"/></block><block s="doSetVar"><l>min</l><block var="num1"/></block></script><script><block s="doSetVar"><l>max</l><block var="num1"/></block><block s="doSetVar"><l>min</l><block var="num2"/></block></script><comment w="90" collapsed="false">If the first number is less than the second number, then it will set the min to the first number and the max to the second number. Otherwise, it will set the first number to the max and the second number to the min,</comment></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doUntil"><block s="reportGreaterThan"><block var="index"/><block var="min"/></block><script><block s="doIf"><block s="reportAnd"><block s="reportEquals"><block s="reportModulus"><block var="num1"/><block var="index"/></block><l>0</l></block><block s="reportEquals"><block s="reportModulus"><block var="num2"/><block var="index"/></block><l>0</l></block></block><script><block s="doSetVar"><l>gcd</l><block var="index"/></block></script><comment w="90" collapsed="false">Loop that repeats until the index is over the first number(Otherwise, there can be no greatest common divisor found). If the first number and the second number remainder is zero when divided by the same index(ex. 10 mod 10 = 0 and 40 mod 10 = 0 ), it will set the greatest common divisor to the index. After the loop, it will report the greatest common divisor. </comment></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block var="gcd"/></block></script></block-definition></blocks><variables><variable name="divisorsList"><list struct="atomic" id="389">1,7,49</list></variable></variables></project><media name="U2L4-MathLibraryKM/JX" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>