<snapdata remixID="10732350"><project name="Lab 3.3 Starter code for Calendar lab" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAAm1JREFUeF7t18FphFAARdFvMXYwjbi2Cutyaz/24cZAICGbJLu5IGe2Cg/vPygz3fd9Dz8FogITgFF5s58FAAQhLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWAPCX/K/Xa2zbNtZ1TQ/o6eMA/nHCy7J8Xz3Pc+z7PuZ5frqJtz4fgP/k/onw69ZpmsZ1XeM4jrce1hPHAAQwdQ2gTzCAaQF/QtL83oBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3/gHXFfyoETVdsgAAAABJRU5ErkJggg==</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="true" 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="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="19.878905250000003" y="79"><custom-block s="day name from day number %n"><l>7</l><comment w="90" collapsed="false">ctrl + left-click to edit me!</comment></custom-block></script><script x="18.878905250000003" y="10"><custom-block s="month name from month number %n"><l>12</l><comment w="90" collapsed="false">ctrl + left-click to edit me!</comment></custom-block></script><script x="20" y="145.000001"><custom-block s="days in the month of %txt"><l>February</l><comment w="90" collapsed="false">ctrl + left-click to edit me!</comment></custom-block></script><script x="14.878905250000003" y="319"><custom-block s="Is the year %n a leap year?"><l></l></custom-block></script><script x="20.878905250000003" y="259"><custom-block s="day %n in year %n"><l></l><l></l></custom-block></script><script x="24.878905250000003" y="211.00000000000003"><custom-block s="is the %n of %txt a valid date?"><l></l><l></l></custom-block></script></scripts></sprite></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="month name from month number %&apos;number&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doAsk"><custom-block s="join words %mult%txt"><list><l>Give me a number from 1 to 12, and I will tell you what month it is.</l></list></custom-block></block><block s="doSetVar"><l>number</l><block s="getLastAnswer"></block></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>1</l></block><script><block s="doReport"><l>It&apos;s January!</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>2</l></block><script><block s="doReport"><l>It&apos;s February</l></block></script><comment w="205.999999" collapsed="false">write similar code for months 2 through 12!</comment></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>3</l></block><script><block s="doReport"><l>It&apos;s March</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>4</l></block><script><block s="doReport"><l>It&apos;s April</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>5</l></block><script><block s="doReport"><l>It&apos;s May</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>6</l></block><script><block s="doReport"><l>It&apos;s June</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>7</l></block><script><block s="doReport"><l>It&apos;s July</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>8</l></block><script><block s="doReport"><l>It&apos;s August</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>9</l></block><script><block s="doReport"><l>It&apos;s September</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>10</l></block><script><block s="doReport"><l>It&apos;s October</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>11</l></block><script><block s="doReport"><l>It&apos;s November</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>12</l></block><script><block s="doReport"><l>It&apos;s December</l></block></script></block><block s="doIf"><block s="reportOr"><block s="reportLessThan"><block var="number"/><l>1</l></block><block s="reportGreaterThan"><block var="number"/><l>12</l></block></block><script><block s="doReport"><l>Error</l><comment w="205.999999" collapsed="false">Make sure to have it tell your user if they&apos;ve selected a number that won&apos;t represent a month. Let&apos;s keep it PG-13, please.</comment></block></script></block></script></block-definition><block-definition s="days in the month of %&apos;month name&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doAsk"><block s="reportJoinWords"><list><l>Tell </l><l>me </l><l>the </l><l>name </l><l>of </l><l>the </l><l>month, </l><l>and </l><l>I </l><l>will </l><l>tell </l><l>you </l><l>how </l><l>many </l><l>days </l><l>is </l><l>in it.</l></list></block><comment w="191" collapsed="true">what goes in the blanks? Fill it in!</comment></block><block s="doSetVar"><l>month name</l><block s="getLastAnswer"></block><comment w="311" collapsed="true">What should you do with the answer to the above question?</comment></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>January</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>30 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>February</l><comment w="497" collapsed="false">Copy the &quot;join&quot; block from the above month for the months 2 - 12. Make sure to fill in the appropriate month name and number of days!</comment></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>28 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>March</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>31 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>April</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>30 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>May</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>31 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>June</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>30 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>July</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>31 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>August</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>31 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>September</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>30 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>October</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>31 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>November</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>30 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="month name"/><l>December</l></block><script><block s="doReport"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l>31 </l><l>days </l><l>in </l><l>it.</l></list></block></block></script></block><block s="doReport"><l>Error</l><comment w="438" collapsed="false">What should we tell the user if they input something that isn&apos;t a month? (Keep it PG-13!)</comment></block></script><scripts><comment x="813.9999999999999" y="14.199999999999989" w="90" collapsed="false">This block takes a month name as an argument and says how many days are in that month. &#xD;&#xD;(Assume a non-leap year.)&#xD;&#xD;Use yoiur previous blocks as templates!</comment><script x="563.9951171874999" y="469.5"><block s="reportJoinWords"><list><block var="month name"/><l> has </l><l></l><l>days </l><l>in </l><l>it.</l></list></block></script></scripts></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="day name from day number %&apos;number&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doAsk"><l>Give me a week day number 1-7</l><comment w="194" collapsed="true">what should we ask the user?</comment></block><block s="doSetVar"><l>number</l><block s="getLastAnswer"></block><comment w="303" collapsed="true">what should we do with the answer to the above question?</comment></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>1</l></block><script><block s="doReport"><l>Sunday</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>2</l></block><script><block s="doReport"><l>Monday</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>3</l></block><script><block s="doReport"><l>Tuesday</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>4</l></block><script><block s="doReport"><l>Wednesday</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>5</l></block><script><block s="doReport"><l>Thursday</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>6</l></block><script><block s="doReport"><l>Friday</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>7</l></block><script><block s="doReport"><l>Saturday</l></block></script></block><block s="doIf"><block s="reportOr"><block s="reportLessThan"><block var="number"/><l>1</l></block><block s="reportGreaterThan"><block var="number"/><l>7</l></block><comment w="261" collapsed="true">What numbers are outside the range for a week?</comment></block><script><block s="doReport"><l>Error</l><comment w="433" collapsed="true">If the user gives an answer outside of our expected range, what should we tell them?</comment></block></script></block></script><scripts><comment x="485.9999999999999" y="16.000000000000007" w="114" collapsed="false">This block takes a number between 1 and 7 as an argument and says the name of the corresponding day. (For our purposes, the week begins on Sunday.)&#xD;&#xD;Use the &quot;month name&quot; block as a template to finish this one!</comment></scripts></block-definition><block-definition s="days in %&apos;monthnumber&apos; month" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIf"><block s="reportOr"><block s="reportOr"><block s="reportOr"><block s="reportOr"><block s="reportOr"><block s="reportOr"><block s="reportEquals"><block var="monthnumber"/><l>1</l></block><block s="reportEquals"><block var="monthnumber"/><l>3</l></block></block><block s="reportEquals"><block var="monthnumber"/><l>5</l></block></block><block s="reportEquals"><block var="monthnumber"/><l>7</l></block></block><block s="reportEquals"><block var="monthnumber"/><l>8</l></block></block><block s="reportEquals"><block var="monthnumber"/><l>10</l></block></block><block s="reportEquals"><block var="monthnumber"/><l>12</l></block></block><script><block s="doReport"><block s="reportJoinWords"><list><l>The </l><l>month </l><l>of </l><custom-block s="month name from month number %n"><block var="monthnumber"/></custom-block><l> has </l><l>31 </l><l>days.</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="monthnumber"/><l>2</l></block><script><block s="doReport"><block s="reportJoinWords"><list><l>The </l><l>month </l><l>of </l><custom-block s="month name from month number %n"><block var="monthnumber"/></custom-block><l> has </l><l>28 </l><l>days.</l></list></block></block></script></block><block s="doIf"><block s="reportOr"><block s="reportOr"><block s="reportOr"><block s="reportEquals"><block var="monthnumber"/><l>4</l></block><block s="reportEquals"><block var="monthnumber"/><l>6</l></block></block><block s="reportEquals"><block var="monthnumber"/><l>9</l></block></block><block s="reportEquals"><block var="monthnumber"/><l>11</l></block></block><script><block s="doReport"><block s="reportJoinWords"><list><l>The </l><l>month </l><l>of </l><custom-block s="month name from month number %n"><block var="monthnumber"/></custom-block><l> has </l><l>30 </l><l>days.</l></list></block></block></script></block><block s="doIf"><block s="reportOr"><block s="reportLessThan"><block var="monthnumber"/><l>1</l></block><block s="reportGreaterThan"><block var="monthnumber"/><l>12</l></block></block><script><block s="doReport"><block s="reportJoinWords"><list><l>Sorry, </l><l>I </l><l>don&apos;t </l><l>know </l><l>how </l><l>many </l><l>days </l><l>Smarch </l><l>has </l><l>this </l><l>solar </l><l>cycle...</l></list></block></block></script></block></script></block-definition><block-definition s="Is the year %&apos;yearnumber&apos; a leap year?" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs></block-definition><block-definition s="is the %&apos;date&apos; of %&apos;monthName&apos; a valid date?" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%txt"></input></inputs><script><block s="doIfElse"><block s="reportOr"><block s="reportLessThan"><block var="date"/><l>1</l></block><block s="reportGreaterThan"><block var="date"/><l>31</l></block></block><script><block s="doReport"><block s="reportJoinWords"><list><l>The </l><block var="date"/><l> is </l><l>not </l><l>a </l><l>valid </l><l>date </l><l>in </l><block var="monthName"/><l>...</l><l> Maybe</l><l> Smarch?</l></list><comment w="326" collapsed="false">We want to tell users if they&apos;ve given a date outside of the range...</comment></block></block></script><script><block s="doIf"><block s="reportEquals"><block var="monthName"/><l>January</l></block><script><block s="doIf"><block s="reportGreaterThan"><block var="date"/><l>31</l></block><script><block s="doReport"><l></l></block></script></block></script></block><block s="doIf"><block s="reportEquals"><block var="monthName"/><l>February</l></block><script><block s="doIf"><block s="reportGreaterThan"><block var="date"/><l>28</l></block><script><block s="doReport"><l></l></block></script></block></script><comment w="90" collapsed="false">We&apos;ll want to repeat this for the rest of the months of the year.</comment></block></script></block><block s="doReport"><block s="reportJoinWords"><list><l>Yeah, </l><l>I </l><l>remember </l><l>the </l><block var="date"/><l> night </l><l>of </l><block var="monthName"/><l>, </l><l>EWF...</l></list><comment w="430" collapsed="true">We want to tell users if they&apos;ve chosen correctly for their date and month.</comment></block></block></script><scripts><script x="12.999999000000003" y="1426"><block s="doReport"><block s="reportJoinWords"><list><l>I </l><l>haven&apos;t </l><l>heard </l><l>of </l><l>that </l><l>month...</l></list></block></block></script><script x="12.999999000000003" y="1382"><block s="doReport"><block s="reportJoinWords"><list><l>The </l><l>month </l><l>of </l><block var="monthName"/><l> has </l><l>31 </l><l>days.</l></list></block></block></script><script x="17.999999000000003" y="878"><block s="doIf"><block s="reportEquals"><block var="monthName"/><l>February</l></block><script><block s="doReport"><block s="reportJoinWords"><list><l>The </l><l>month </l><l>of </l><block var="monthName"/><l> has </l><l>28 </l><l>days.</l></list></block></block></script></block></script><script x="26.999999000000003" y="966"><block s="doReport"><block s="reportJoinWords"><list><l>The </l><l>month </l><l>of </l><block var="monthName"/><l> has </l><l>30 </l><l>days.</l></list></block></block></script><comment x="989.9999990000001" y="10.199999999999989" w="90" collapsed="false">This block takes a month name and a date as arguments and says whether or not that date exists in that month. &#xD;&#xD;For example, the 31st is a valid date in January, but not in June. &#xD;&#xD;The 5th is a valid date in every month, and the 40th is not a valid date in any month.&#xD;</comment></scripts></block-definition><block-definition s="day %&apos;day&apos; in year %&apos;year&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs></block-definition></blocks><variables></variables></project><media name="Lab 3.3 Starter code for Calendar lab" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>