<snapdata remixID="8883242"><project name="Unit 2: Project 2 - Amogh Jupalli" app="Snap! 5.1, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAADJklEQVR4Xu3VIaoCcRSF8TsomDRbTFaLweIqTK7D5hIEq82qq7K5BLPgPJ7t8UDbfDDnswl/uPee84Np2rZty58JQAk0AoSSd+w7AQEKAU1AgGj8DhegBtAEBIjG73ABagBNQIBo/A4XoAbQBASIxu9wAWoATUCAaPwOF6AG0AQEiMbvcAFqAE1AgGj8DhegBtAEBIjG73ABagBNQIBo/A4XoAbQBASIxu9wAWoATUCAaPwOF6AG0AQEiMbvcAFqAE1AgGj8DhegBtAEBIjG73ABagBNQIBo/A4XoAbQBASIxu9wAWoATUCAaPwOF6AG0AQEiMbvcAFqAE1AgGj8DhegBtAEBIjG73ABagBNQIBo/A4XoAbQBASIxu9wAWoATUCAaPwOF6AG0AQEiMbvcAFqAE1AgGj8DhegBtAEBIjG73ABagBNQIBo/A4XoAbQBASIxu9wAWoATUCAH+JfLpd1Op1qtVrVaDRCi+rrcAF+aXaz2VTTNO9Xj8ejLpdLTafTGgwGfTXR6V0C/BL3/X6v3W7379Xr9arZbFaHw6HG43GnpfVpmAC/tHm73Wq/3/959YtvOBzWfD6v4/HYJw+d3yLAD5E/n8/abrfVtu37k/v7/3q91mQy6byovg4U4Idm1+t1nc/nWiwWfe0fv0uAeAXZCwgwu3/8egHiFWQvIMDs/vHrBYhXkL2AALP7x68XIF5B9gICzO4fv16AeAXZCwgwu3/8egHiFWQvIMDs/vHrBYhXkL2AALP7x68XIF5B9gICzO4fv16AeAXZCwgwu3/8egHiFWQvIMDs/vHrBYhXkL2AALP7x68XIF5B9gICzO4fv16AeAXZCwgwu3/8egHiFWQvIMDs/vHrBYhXkL2AALP7x68XIF5B9gICzO4fv16AeAXZCwgwu3/8egHiFWQvIMDs/vHrBYhXkL2AALP7x68XIF5B9gICzO4fv16AeAXZCwgwu3/8egHiFWQvIMDs/vHrBYhXkL2AALP7x68XIF5B9gICzO4fv16AeAXZCwgwu3/8egHiFWQvIMDs/vHrBYhXkL2AALP7x68XIF5B9gI/RoUItwrUnsUAAAAASUVORK5CYII=</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" volume="100" pan="0" lines="round" ternary="true" codify="false" inheritance="false" 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="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;Student A: /Amogh Jupalli/&#xD;&#xD;Student B: /Amogh Jupalli/</comment><script x="30" y="107.33333333333337"><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="184.66666666666663" 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="285.9999999999999"><custom-block s="next to last letter of %txt"><l></l></custom-block></script><script x="30" y="314"><custom-block s="%txt is a vowel?"><l></l></custom-block></script><script x="30" y="342"><custom-block s="%txt ends with %txt ?"><l></l><l></l></custom-block></script><script x="30" y="370"><custom-block s="plural-s %s"><l></l></custom-block></script><script x="30" y="398"><custom-block s="plural-y %txt"><l></l></custom-block></script><script x="30" y="426"><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><comment x="30" y="463.33333333333337" 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="564.6666666666666"><custom-block s="plural-f %txt"><l>h</l></custom-block></script><script x="30" y="592.6666666666667"><custom-block s="plural-x %txt"><l>box</l></custom-block></script><comment x="30" y="620.6666666666666" 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="694"><custom-block s="plural %txt"><l></l></custom-block></script><comment x="30" y="722" 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="795.3333333333333"><custom-block s="plural %txt"><l></l></custom-block></script><comment x="30" y="823.3333333333333" 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="932.6666666666667"><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="962.0000000000002"><custom-block s="special case %txt"><l></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="1038.3333333333335"><custom-block s="exception words %txt"><l></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="1114.6666666666665" 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="1188.0000000000002"><custom-block s="plural %txt"><l>f</l></custom-block></script><comment x="30" y="1301.3333333333337" 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="1362.666666666667"><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><comment x="383.9325842696629" y="1101.9550561797755" 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:   If we did not address the special case words at the beginning of the plural block, the code would have checked all the other conditions before checking whether or not it was a special case word. Since the report block immediately exits the loop, this means that if the special case word meets the criteria for another if statement, it would follow that rule. For example, if word was ox and we kept the special case word block at the bottom, it would have run the plural-x block as that condition is met first. If we kept the special case word block at the very bottom, it would never have been run as the &apos;add an s to the end&apos; section of the code right before it would be run everytime none of the conditions before it had been met, meaning that the special case words block would never have been run</comment><script x="31.685393258426984" y="539.4756554307116"><custom-block s="plural-h %txt"><l>th</l></custom-block></script><script x="21.01123595505618" y="255.75280898876406"><custom-block s="plural %txt"><l></l></custom-block></script></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="reportAnd"><block s="reportNot"><block s="reportEquals"><custom-block s="next to last letter of %txt"><block var="word"/></custom-block><l> </l></block></block><block s="reportEquals"><custom-block s="last letter of %txt"><block var="word"/></custom-block><l> </l></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"/></custom-block><script><block s="doReport"><custom-block s="exception words %txt"><block var="word"/></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>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>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>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><scripts><comment x="362.35955056179773" y="64.71910112359551" w="89.99999999999999" collapsed="false">Do i need this?</comment></scripts></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="89.99999999999999" 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="reportListContainsItem"><block s="reportNewList"><list><l>p</l><l>g</l><l>t</l></list></block><custom-block s="next to last letter of %txt"><block var="word"/></custom-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><scripts><script x="83.81466840515276" y="234.83146367415728"><block var="word"/></script></scripts></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="doIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>mouse</l><l>ox</l><l>child</l><l>man</l></list></block><block var="word"/></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="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>mouse</l></block><script><block s="doReport"><l>mice</l></block></script></block><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>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="1145">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 - Amogh Jupalli" app="Snap! 5.1, http://snap.berkeley.edu" version="1"></media></snapdata>