<snapdata remixID="9969083"><project name="(S1 2020) 3.4 If my calculations are correct" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAA7dJREFUeAHt1j1KgwEMgOFUxEEHB0GcdBctbiI6uQh6AvEC7t7Cgzh6G9eCixcQfwZ/283hK4QGAvJ0bGNCH1/ajr5/H+FBoElgqemuswRmAgIUQquAAFv5HRegBloFBNjK77gANdAqIMBWfscFqIFWAQG28jsuQA20Cgiwld9xAWqgVUCArfyOC1ADrQICbOV3XIAaaBUQYCu/4wLUQKuAAFv5HRegBloFBNjK77gANdAqIMBWfscFqIFWAQG28jsuQA20Cgiwld9xAWqgVUCArfyOC1ADrQICbOV3XIAaaBUQYCu/4wLUQKuAAFv5HRegBloFBNjK77gANdAqIMBWfscFqIFWAQG28jsuQA20Cgiwld9xAWqgVUCArfyOC1ADrQICbOV3XIAaaBUQYCu/4wLUQKuAAFv5HRegBloFBNjK77gANdAqIMBWfscFqIFWAQEO8D89PcXb29vAq56uEliuWvTf9tzd3cX9/X0cHh7GyclJHBwcxM7OTiwvI6v8X4++fx+VC//Lrs/Pz7i5uYnJZDJ7S+/v7zEajeL4+DiOjo5if38/tra2/svbbXsfApxD//r6GpeXl7G09PeXysfHR7y8vMTa2lqcnp7G1dVVbG5uztnkpSEB3ydDMr/PPzw8xPPzc6yvr8+mpp+K00/C1dXV2N3dnX09n52dxcbGxpwtXpon4BNwQOfx8TGur6/j6+tr9rtv+nU7Ho/j4uIitre3Y2VlZeAvPZ0REOCA1u3tbUy/gs/Pz2Nvb2/2qTcw6ukFBAS4AJ4/XVzg76/rxffZQCAlIMAUl+FqAQFWi9qXEhBgistwtYAAq0XtSwkIMMVluFpAgNWi9qUEBJjiMlwtIMBqUftSAgJMcRmuFhBgtah9KQEBprgMVwsIsFrUvpSAAFNchqsFBFgtal9KQIApLsPVAgKsFrUvJSDAFJfhagEBVovalxIQYIrLcLWAAKtF7UsJCDDFZbhaQIDVovalBASY4jJcLSDAalH7UgICTHEZrhYQYLWofSkBAaa4DFcLCLBa1L6UgABTXIarBQRYLWpfSkCAKS7D1QICrBa1LyUgwBSX4WoBAVaL2pcSEGCKy3C1gACrRe1LCQgwxWW4WkCA1aL2pQQEmOIyXC0gwGpR+1ICAkxxGa4WEGC1qH0pAQGmuAxXCwiwWtS+lIAAU1yGqwUEWC1qX0pAgCkuw9UCAqwWtS8lIMAUl+FqAQFWi9qXEhBgistwtYAAq0XtSwkIMMVluFpAgNWi9qUEfgDDcVlvKkPqCAAAAABJRU5ErkJggg==</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAC99JREFUeAHt0DEBAAAAwqD1T20MH4hAYcCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMG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DBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBj4DAyN/gABHhb3AgAAAABJRU5ErkJggg==</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="1.0480349344975366" y="-2.3860262008733457" 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="17" y="10"><block s="receiveKey"><l><option>a</option></l><comment w="90" collapsed="false">reports the square of a number</comment></block><block s="doAsk"><l>What is the number you want squared?</l></block><block s="doSayFor"><block s="reportJoinWords"><list><block s="getLastAnswer"></block><l> squared is </l><custom-block s="getSquared %s"><block s="getLastAnswer"></block></custom-block></list></block><l>2</l></block></script><script x="17" y="109"><block s="receiveKey"><l><option>s</option></l><comment w="90" collapsed="false">Reports a number to a certain power</comment></block><block s="doAsk"><l>What is the number?</l></block><block s="doSetVar"><l>number</l><block s="getLastAnswer"></block></block><block s="doAsk"><l>What is your power?</l></block><block s="doSetVar"><l>power</l><block s="getLastAnswer"></block></block><block s="doSayFor"><block s="reportJoinWords"><list><block var="number"/><l> to the </l><block var="power"/><l>th is </l><custom-block s="getPower %s %s"><block var="number"/><block var="power"/><variables><variable name="result"><l>256</l></variable></variables></custom-block></list></block><l>2</l></block></script><script x="26" y="291"><block s="receiveKey"><l><option>3</option></l><comment w="204" collapsed="false">3: Checks to see if a (b) is between two other variables a and c... in other words... return true if a = b or b = c or (a &lt; b  and b &lt; c)</comment></block><block s="doAsk"><l>What is the first number?</l></block><block s="doSetVar"><l>a</l><block s="getLastAnswer"></block></block><block s="doAsk"><l>What is the second number?</l></block><block s="doSetVar"><l>b</l><block s="getLastAnswer"></block></block><block s="doAsk"><l>What is the third number?</l></block><block s="doSetVar"><l>c</l><block s="getLastAnswer"></block></block><block s="doSayFor"><block s="reportJoinWords"><list><l>Is </l><block var="a"/><l>&lt;=</l><block var="b"/><l>&lt;=</l><block var="c"/><l> true? </l><custom-block s="isBetween %s %s %s"><block var="a"/><block var="b"/><block var="c"/></custom-block></list></block><l>2</l></block></script><script x="49" y="540"><block s="receiveKey"><l><option>6</option></l><comment w="175" collapsed="false">6.  Asks the user for a letter and a word and says true if the word contains the letter, false if it doesn&apos;t</comment></block><block s="doAsk"><l>What is the word?</l></block><block s="doSetVar"><l>word</l><block s="getLastAnswer"></block></block><block s="doAsk"><l>What is the letter?</l></block><block s="doSetVar"><l>letter</l><block s="getLastAnswer"></block></block><block s="doSayFor"><block s="reportJoinWords"><list><l>Does the word </l><block var="word"/><l> contain the letter</l><block var="letter"/><l>? </l><custom-block s="isLetterInWord %s %s"><block var="word"/><block var="letter"/><variables><variable name="result"><bool>false</bool></variable><variable name="index"><l>4</l></variable></variables></custom-block></list></block><l>2</l></block></script><script x="36" y="726.0000000000002"><block s="receiveKey"><l><option>4</option></l></block><block s="doAsk"><l>What si your first number?</l></block><block s="doSetVar"><l>number</l><block s="getLastAnswer"></block></block><block s="doAsk"><l>Whats is your second number?</l></block><block s="doSetVar"><l>number</l><block s="getLastAnswer"></block></block><block s="doSayFor"><block s="reportJoinWords"><list><l>hello </l><l>world</l></list></block><l>2</l></block></script></scripts></sprite><watcher var="number" style="normal" x="0.31190071478386017" y="0.31190071478381753" color="243,118,29" hidden="true"/><watcher var="power" style="normal" x="0.34309078626233713" y="1.2476029215154298" color="243,118,29" hidden="true"/><watcher var="a" style="normal" x="1.5902777777778283" y="1.5902777777777857" color="243,118,29" hidden="true"/><watcher var="b" style="normal" x="1.5902777777778283" y="4.929861429166671" color="243,118,29" hidden="true"/><watcher var="c" style="normal" x="1.5902777777778283" y="8.269445080555556" color="243,118,29" hidden="true"/><watcher var="word" style="normal" x="3.4281437125748653" y="3.428143712574851" color="243,118,29" hidden="true"/><watcher var="letter" style="normal" x="3.4281437125748653" y="10.627246194610784" color="243,118,29" hidden="true"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="getSquared %&apos;number&apos;" type="reporter" category="operators"><comment x="0" y="0" w="90" collapsed="false">reports the square of a number</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportProduct"><block var="number"/><block var="number"/></block></block></script></block-definition><block-definition s="getPower %&apos;number&apos; %&apos;power&apos;" type="reporter" category="operators"><comment x="0" y="0" w="196" collapsed="false">returns number to the powereth power </comment><variables><list struct="atomic" id="164">result</list></variables><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>result</l><l>1</l></block><block s="doRepeat"><block var="power"/><script><block s="doSetVar"><l>result</l><block s="reportProduct"><block var="result"/><block var="number"/></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="isBetween %&apos;a&apos; %&apos;b&apos; %&apos;c&apos;" type="predicate" category="operators"><comment x="0" y="0" w="126" collapsed="false">returns true if a &lt;= b &lt;= c</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportOr"><block s="reportEquals"><block var="a"/><block var="b"/></block><block s="reportOr"><block s="reportEquals"><block var="b"/><block var="c"/></block><block s="reportAnd"><block s="reportLessThan"><block var="a"/><block var="b"/></block><block s="reportLessThan"><block var="b"/><block var="c"/></block></block></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="isLetterInWord %&apos;word&apos; %&apos;letter&apos;" type="predicate" category="operators"><comment x="0" y="0" w="90" collapsed="false">Checks to see if letter is in the word</comment><variables><list struct="atomic" id="219">result,index</list></variables><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>index</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doRepeat"><block s="reportStringSize"><block var="word"><comment w="90" collapsed="false">Loops through each letter</comment></block></block><script><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="word"/></block><block var="letter"/></block><script><block s="doSetVar"><l>result</l><block s="reportBoolean"><l><bool>true</bool></l><comment w="174" collapsed="false">If the current letter matches our target, our result will be true</comment></block></block></script></block><block s="doChangeVar"><l>index</l><l>1</l><comment w="90" collapsed="false">Goes to the next letter</comment></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition></blocks><variables><variable name="number"><l>4</l></variable><variable name="power"><l>4</l></variable><variable name="a"><l>2</l></variable><variable name="b"><l>2</l></variable><variable name="c"><l>2</l></variable><variable name="word"><l>one</l></variable><variable name="letter"><l>a</l></variable></variables></project><media name="(S1 2020) 3.4 If my calculations are correct" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>