<snapdata remixID="10942804"><project name="Unit 2: Project 2 (Ryan Cahill)" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAA2pJREFUeF7t1i1KrX0UxuH/QdDgBwo2gwOw2hyAQVFwOkYxmpySRRyPxaAHDS9v8rDgxhvkepJhsRb7en5s95+Pj4+P5SFQEvgjwJK8s18CAhRCVUCAVX7HBaiBqoAAq/yOC1ADVQEBVvkdF6AGqgICrPI7LkANVAUEWOV3XIAaqAoIsMrvuAA1UBUQYJXfcQFqoCogwCq/4wLUQFVAgFV+xwWogaqAAKv8jgtQA1UBAVb5HRegBqoCAqzyOy5ADVQFBFjld1yAGqgKCLDK77gANVAVEGCV33EBaqAqIMAqv+MC1EBVQIBVfscFqIGqgACr/I4LUANVAQFW+R0XoAaqAgKs8jsuQA1UBQRY5XdcgBqoCgiwyu+4ADVQFRBgld9xAWqgKiDAKr/jAtRAVUCAVX7HBaiBqoAAq/yOC1ADVQEBVvkdF6AGqgICrPI7LkANVAUE+A3/w8PD2t3dXefn5+v4+Lj6on7rcQF+82ZfXl7W7e3t2t7eXq+vr+vq6mrt7e2tm5ubtbOz81ub+NHPJcB/cD8/P6/7+/u1sbHx3+T7+/vX35eXl+vw8HBdXFyszc3NH31xv+WYAP/xJp+entbnv+L/P29vb+vo6GidnZ2tk5OTdXp6+lt6+PHPIcBvyD/ju7u7W1tbW1/fcNfX1+vg4ODrm8+TERDgN46Pj49rf3//6zff5+9AT15AgHlTGwcCAhxgGc0LCDBvauNAQIADLKN5AQHmTW0cCAhwgGU0LyDAvKmNAwEBDrCM5gUEmDe1cSAgwAGW0byAAPOmNg4EBDjAMpoXEGDe1MaBgAAHWEbzAgLMm9o4EBDgAMtoXkCAeVMbBwICHGAZzQsIMG9q40BAgAMso3kBAeZNbRwICHCAZTQvIMC8qY0DAQEOsIzmBQSYN7VxICDAAZbRvIAA86Y2DgQEOMAymhcQYN7UxoGAAAdYRvMCAsyb2jgQEOAAy2heQIB5UxsHAgIcYBnNCwgwb2rjQECAAyyjeQEB5k1tHAgIcIBlNC8gwLypjQMBAQ6wjOYFBJg3tXEgIMABltG8gADzpjYOBAQ4wDKaFxBg3tTGgYAAB1hG8wICzJvaOBAQ4ADLaF5AgHlTGwcCAhxgGc0LCDBvauNAQIADLKN5AQHmTW0cCAhwgGU0LyDAvKmNA4G/QPcFt0kGnSoAAAAASUVORK5CYII=</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" hyperops="true" codify="false" inheritance="false" sublistIDs="false" scheduled="false" id="1"><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="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Sprite" idx="1" x="2.471590969396402" y="-5.881226582318959" 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><comment x="30" y="10" w="194.66666666666666" collapsed="false">Unit 2: Project 2&#xD;&#xD;Name: </comment><script x="30" y="83"><block s="doSetVar"><l>word list</l><block s="reportNewList"><list><l>day</l><l>butterfly</l><l>boy</l><l>spy</l><l>witch</l><l>ash</l><l>path</l><l>laugh</l><l>moth</l><l>knife</l><l>ear muff</l><l>calf</l><l>half</l><l>man</l><l>van</l><l>French fry</l><l>eye</l><l>bulldog </l><l>child</l><l>box</l><l>ox</l><l>boss</l><l>mess</l><l>mouse</l><l>chicken</l><l>medicine</l></list></block></block></script><comment x="30" y="160.22222222222206" w="299.3333333333333" collapsed="false">Task 1 - open the blocks below to see the solutions from Project 1.  They work as intended.  You can use them to finish Project 2.  Test the map block to see how it works with our /word list/.</comment><script x="30" y="233.22222222222206"><custom-block s="plural %txt"><l></l></custom-block></script><script x="30" y="261.22222222222194"><custom-block s="next to last letter of %txt"><l></l></custom-block></script><script x="30" y="289.22222222222194"><custom-block s="%txt is a vowel?"><l></l></custom-block></script><script x="30" y="317.22222222222194"><custom-block s="%txt ends with %txt ?"><l></l><l></l></custom-block></script><script x="30" y="345.22222222222194"><custom-block s="plural-s %s"><l></l></custom-block></script><script x="30" y="373.22222222222194"><custom-block s="plural-y %txt"><l>fly</l></custom-block></script><script x="30" y="401.22222222222194"><custom-block s="map %repRing over %l"><block s="reifyReporter"><autolambda><custom-block s="plural %txt"><l>fly</l></custom-block></autolambda><list></list></block><block var="word list"/></custom-block></script><comment x="30" y="438.5555555555553" w="204.66666666666666" collapsed="false">Task 2 - complete the block definitions for plural-h, plural-f and plural-x.  Try different inputs to make sure they work.</comment><script x="30" y="539.5555555555553"><custom-block s="plural-f %txt"><l>jef</l></custom-block></script><script x="30" y="567.5555555555553"><custom-block s="plural-x %txt"><l></l></custom-block></script><comment x="30" y="595.5555555555553" w="206" collapsed="false">Task 3 - Modify the plural block to include plural-h, plural-f and plural-x.  Try different inputs to make sure they work.</comment><script x="30" y="668.5555555555554"><custom-block s="plural %txt"><l>fly </l></custom-block></script><comment x="30" y="696.5555555555553" w="209.33333333333334" collapsed="false">Task 4 - Modify the plural block to deal with words that have an extra space at the end.  Try different inputs to make sure they work.</comment><script x="30" y="769.5555555555554"><custom-block s="plural %txt"><l></l></custom-block></script><comment x="30" y="797.5555555555554" w="210.66666666666666" collapsed="false">Task 5 - Use the map block to test your plural block with /word list/.  Make a note of any special case words that are not taken care of by our block definitions.  Then define the predicate and reporter blocks below to deal with these words.</comment><script x="30" y="906.5555555555553"><custom-block s="map %repRing over %l"><block s="reifyReporter"><autolambda><custom-block s="plural %txt"><l></l></custom-block></autolambda><list></list></block><block var="word list"/></custom-block></script><script x="30" y="935.8888888888886"><custom-block s="special case %txt"><l>ox</l><comment w="151.33333333333334" collapsed="false">This block should report true if the input is one of the special case words from /word list/</comment></custom-block></script><script x="30" y="1011.8888888888886"><custom-block s="exception words %txt"><l>ox</l><comment w="142.66666666666666" collapsed="false">This block should report the plural form of the special case words from /word list/</comment></custom-block></script><comment x="30" y="1087.8888888888882" w="209.33333333333334" collapsed="false">Task 6 - Modify the plural block to address these special words.  Do so at the beginning of the script.</comment><script x="30" y="1160.8888888888882"><custom-block s="plural %txt"><l>child</l></custom-block></script><comment x="30" y="1273.8888888888887" w="218" collapsed="false">Task 8 - Use the map block to test your plural block one last time to check your work.</comment><script x="30" y="1334.8888888888887"><custom-block s="map %repRing over %l"><block s="reifyReporter"><autolambda><custom-block s="plural %txt"><l></l></custom-block></autolambda><list></list></block><block var="word list"/></custom-block></script><script x="429.66178385416663" y="756.3333150227865"><custom-block s="plural-y %txt"><l></l></custom-block></script><script x="41.66666666666666" y="507.6999816894531"><custom-block s="plural-h %txt"><l></l></custom-block></script><script x="351.66178385416663" y="789.6666483561199"><custom-block s="plural-f %txt"><l></l></custom-block></script><script x="567.6666666666666" y="783.9999816894531"><block s="doReport"><l></l></block></script><script x="671.4098307291666" y="1225.7555372450083"><block var="word"/></script><script x="619.0617472330729" y="902.4000061035156"><custom-block s="plural-y %txt"><block var="word"/></custom-block></script><comment x="30" y="1188.8888888888887" w="285.3333333333333" collapsed="false">Task 7 - What would happen if you did not address the special case words at the beginning of the plural block?&#xD;&#xD;Answer:  it would not work because the other rule would come into effect first in the script not allowing the special case script to run</comment></scripts></sprite><watcher var="word list" style="normal" x="1.6302083333332575" y="1.6302083333333286" color="243,118,29" hidden="true"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="all but last letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="217.99999999999997" collapsed="false">Takes a text string as input, and reports a new text string containing all but the last letter of the input.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l><l>i</l></list></block><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="string"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportSum"><l>0</l><l>0</l></block></block></block></script></block><block s="doSetVar"><l>result</l><l></l></block><block s="doSetVar"><l>i</l><l>1</l></block><block s="doUntil"><block s="reportEquals"><block var="i"/><block s="reportStringSize"><block var="string"/></block></block><script><block s="doSetVar"><l>result</l><block s="reportJoinWords"><list><block var="result"/><block s="reportLetter"><block var="i"/><block var="string"/></block></list></block></block><block s="doChangeVar"><l>i</l><l>1</l></block></script></block><block s="doReport"><block var="result"/></block></script></block></script></block-definition><block-definition s="last letter of %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="260" collapsed="false">Takes a text string as input, and reports the last character in the string.</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportLetter"><block s="reportStringSize"><block var="word"/></block><block var="word"/></block></block></script></block-definition><block-definition s="map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block></list></block></block></block></script><list><l>data</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportListItem"><l>1</l><block var="data lists"/></block></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></list></block></block></block></script><list><l>data lists</l></list></block></block><block s="doIfElse"><custom-block s="empty? %l"><block s="reportCDR"><block var="lists"/></block></custom-block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/></list></block></block></script></block></script></block></script></block-definition><block-definition s="plural %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportEquals"><l> </l><custom-block s="last letter of %txt"><block var="word"/></custom-block></block><script><block s="doSetVar"><l>word</l><custom-block s="all but last letter of %txt"><block var="word"/></custom-block></block></script></block><block s="doIf"><custom-block s="special case %txt"><block var="word"/><comment w="151.33333333333334" collapsed="false">This block should report true if the input is one of the special case words from /word list/</comment></custom-block><script><block s="doReport"><custom-block s="exception words %txt"><block var="word"/><comment w="142.66666666666666" collapsed="false">This block should report the plural form of the special case words from /word list/</comment></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l>y</l><custom-block s="last letter of %txt"><block var="word"/></custom-block></block><script><block s="doReport"><custom-block s="plural-y %txt"><block var="word"/></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l>s</l><custom-block s="last letter of %txt"><block var="word"/></custom-block></block><script><block s="doReport"><custom-block s="plural-s %s"><block var="word"/></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l>h</l><custom-block s="last letter of %txt"><block var="word"/></custom-block></block><script><block s="doReport"><custom-block s="plural-h %txt"><block var="word"/></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l>f</l><custom-block s="last letter of %txt"><block var="word"/></custom-block></block><script><block s="doReport"><custom-block s="plural-f %txt"><block var="word"/></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l>x</l><custom-block s="last letter of %txt"><block var="word"/></custom-block></block><script><block s="doReport"><custom-block s="plural-x %txt"><block var="word"/></custom-block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block var="word"/><l>s</l></list></block></block></script></block-definition><block-definition s="%&apos;letter&apos; is a vowel?" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportListContainsItem"><block s="reportNewList"><list><l>a</l><l>e</l><l>i</l><l>o</l><l>u</l></list></block><block var="letter"/></block></block></script></block-definition><block-definition s="%&apos;word&apos; ends with %&apos;letters&apos; ?" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>temp</l></list></block><block s="doSetVar"><l>temp</l><l></l></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><block s="reportStringSize"><block var="letters"/></block><script><block s="doSetVar"><l>temp</l><block s="reportJoinWords"><list><block var="temp"/><block s="reportLetter"><block s="reportDifference"><block s="reportStringSize"><block var="word"/></block><block s="reportDifference"><block s="reportStringSize"><block var="letters"/></block><block var="i"/></block></block><block var="word"/></block></list></block></block></script></custom-block><block s="doReport"><block s="reportEquals"><block var="temp"/><block var="letters"/></block></block></script></block-definition><block-definition s="plural-s %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIf"><custom-block s="%txt ends with %txt ?"><block var="word"/><l>is</l></custom-block><script><block s="doReport"><block s="reportJoinWords"><list><custom-block s="all but last letter of %txt"><custom-block s="all but last letter of %txt"><block var="word"/></custom-block></custom-block><l>es</l></list></block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block var="word"/><l>es</l></list></block></block></script></block-definition><block-definition s="plural-y %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><custom-block s="%txt is a vowel?"><custom-block s="next to last letter of %txt"><block var="word"/></custom-block></custom-block><script><block s="doReport"><block s="reportJoinWords"><list><block var="word"/><l>s</l></list></block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><custom-block s="all but last letter of %txt"><block var="word"/></custom-block><l>ies</l></list></block></block></script></block-definition><block-definition s="next to last letter of %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><custom-block s="last letter of %txt"><custom-block s="all but last letter of %txt"><block var="word"/></custom-block></custom-block></block></script></block-definition><block-definition s="label %&apos;text&apos; of size %&apos;size&apos;" type="command" category="pen"><comment x="0" y="0" w="90" collapsed="false">LABEL will stamp text on the stage at the given font size. The direction of the text is the direction the sprite is facing, and color will match the pen color.</comment><header></header><code></code><translations></translations><inputs><input type="%txt">Hello!</input><input type="%n">12</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>text</l><l>size</l></list><l>var stage = this.parentThatIsA(StageMorph),&#xD;    context = stage.penTrails().getContext(&apos;2d&apos;),&#xD;    rotation = radians(this.direction() - 90),&#xD;    trans = new Point(&#xD;      this.center().x - stage.left(),&#xD;      this.center().y - stage.top()&#xD;    ),&#xD;    isWarped = this.Warped,&#xD;    len,&#xD;    pos;&#xD;&#xD;if (isWarped) {endWarp(); }&#xD;context.save();&#xD;context.font = size + &apos;px monospace&apos;;&#xD;context.textAlign = &apos;left&apos;;&#xD;context.textBaseline = &apos;alphabetic&apos;;&#xD;context.fillStyle = this.color.toString();&#xD;len = context.measureText(text).width;&#xD;trans = trans.multiplyBy(1 / stage.scale);&#xD;context.translate(trans.x, trans.y);&#xD;context.rotate(rotation);&#xD;context.fillText(text, 0, 0);&#xD;context.translate(-trans.x, -trans.y);&#xD;context.restore();&#xD;pos = new Point(&#xD;  len * Math.sin(radians(this.direction())),&#xD;  len * Math.cos(radians(this.direction())));&#xD;pos = pos.add(new Point(this.xPosition(), this.yPosition()));&#xD;this.gotoXY(pos.x, pos.y, false);&#xD;this.changed();&#xD;if (isWarped) {this.startWarp(); }&#xD;stage.changed();</l></block><list><block var="text"/><block var="size"/></list></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="keep items such that %&apos;pred&apos; from %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script><script><block s="doReport"><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></script></block></script></block></script></block-definition><block-definition s="combine with %&apos;function&apos; items of %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="data"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="data"/></block></block></script></block><block s="doReport"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="combine with %repRing items of %l"><block var="function"/><block s="reportCDR"><block var="data"/></block></custom-block></list></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; then %&apos;true&apos; else %&apos;false&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%anyUE"></input><input type="%anyUE"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doReport"><block s="evaluate"><block var="true"/><list></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="false"/><list></list></block></block></script></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>step</l><l>tester</l></list></block><block s="doIfElse"><block s="reportGreaterThan"><block var="start"/><block var="end"/></block><script><block s="doSetVar"><l>step</l><l>-1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportLessThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>step</l><l>1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportGreaterThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doUntil"><block s="evaluate"><block var="tester"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block><block s="doChangeVar"><l>i</l><block var="step"/></block></script></block></script></block-definition><block-definition s="join words %&apos;words&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="words"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="words"/></block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>1</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>2</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="words"/></block><block s="reportCDR"><block s="reportCDR"><block var="words"/></block></block></block></custom-block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="words"/></block><l> </l><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></list></block></block></script></block></script><scripts><script x="229.000003" y="196.77778077777774"><block s="reportJoinWords"><list><l></l><l></l></list></block></script></scripts></block-definition><block-definition s="list $arrowRight sentence %&apos;data&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><custom-block s="join words %mult%txt"><block var="data"/></custom-block></block></script></block></script></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="text"/><l><option>whitespace</option></l></block></block></script></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></block><custom-block s="ignore %s"><l>3</l></custom-block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">catchtag</input></inputs><script><block s="doRun"><block var="cont"/><list></list></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;value&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doReport"><block s="evaluate"><block var="value"/><list></list></block></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definition s="throw %&apos;tag&apos; %&apos;value&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">catchtag</input><input type="%s"></input></inputs><script><block s="doRun"><block var="tag"/><list><block var="value"/></list></block></script></block-definition><block-definition s="for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block s="doUntil"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; do %&apos;action&apos; and pause all $pause-1-255-220-0" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>breakpoint</l></list></block><block s="doIf"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doSetVar"><l>breakpoint</l><block var="test"/></block><block s="doShowVar"><l>breakpoint</l></block><block s="doRun"><block var="action"/><list></list></block><block s="doPauseAll"></block><block s="doHideVar"><l></l></block></script></block></script></block-definition><block-definition s="word $arrowRight list %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="word"/><l><option>letter</option></l></block></block></script></block></script></block-definition><block-definition s="ignore %&apos;x&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="list $arrowRight word %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportJoinWords"><block var="list"/></block></block></script></block></script></block-definition><block-definition s="%&apos;x&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block var="x"/></block></script></block-definition><block-definition s="numbers from %&apos;from&apos; to %&apos;to&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n">1</input><input type="%n">10</input></inputs><script><block s="doIf"><block s="reportGreaterThan"><block var="from"/><block var="to"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block var="from"/><custom-block s="numbers from %n to %n"><block s="reportSum"><block var="from"/><l>1</l></block><block var="to"/></custom-block></block></block></script></block-definition><block-definition s="map %&apos;func&apos; over %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block var="data"/></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="func"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><custom-block s="map %repRing over %l"><block var="func"/><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script></block-definition><block-definition s="plural-h %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportOr"><custom-block s="%txt ends with %txt ?"><block var="word"/><l>ph</l></custom-block><block s="reportOr"><custom-block s="%txt ends with %txt ?"><block var="word"/><l>gh</l></custom-block><custom-block s="%txt ends with %txt ?"><block var="word"/><l>th</l></custom-block></block></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="word"/><l>s</l></list></block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block var="word"/><l>es</l></list></block></block></script></block-definition><block-definition s="plural-f %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportEquals"><custom-block s="next to last letter of %txt"><block var="word"/></custom-block><l>f</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="word"/><l>s</l></list></block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><custom-block s="all but last letter of %txt"><block var="word"/></custom-block><l>ves</l></list></block></block></script></block-definition><block-definition s="plural-x %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportJoinWords"><list><block var="word"/><l>es</l></list></block></block></script></block-definition><block-definition s="special case %&apos;word&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportListContainsItem"><block s="reportNewList"><list><l>child</l><l>ox</l><l>mouse</l><l>man</l></list></block><block var="word"/></block></block></script></block-definition><block-definition s="exception words %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="word"/><l>ox</l></block><script><block s="doReport"><l>oxen</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="word"/><l>child</l></block><script><block s="doReport"><l>children</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="word"/><l>mouse</l></block><script><block s="doReport"><l>mice</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="word"/><l>man</l></block><script><block s="doReport"><l>men</l></block></script></block></script></block-definition></blocks><variables><variable name="word list"><list struct="atomic" id="1135">day,butterfly,boy,spy,witch,ash,path,laugh,moth,knife,ear muff,calf,half,man,van,French fry,eye,bulldog ,child,box,ox,boss,mess,mouse,chicken,medicine</list></variable></variables></project><media name="Unit 2: Project 2 (Ryan Cahill)" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>