<snapdata remixID="9937457"><project name="2.4 Kyle Random Number" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAMNUlEQVR4Xu2daVBVyRXH//AAAUVhXNkE2VxQAzgYHCzHuGCMllZ0QmrQTEWFMaWO1ARTmppK/JCqmA+paBmlajImI8ZBR4vRxFKcMDIoroBbuZULICAiiwsIIutLncb3fJfl8Z44dbl9T38B3rv3dvf//Kr7ntOnGwej0WgEF1ZAJQUcGECVlOdqhQIMIIOgqgLdAnjp0iUEBATAYDD8II2rrq6Gm5sb/Pz8fpDn80O1o0AXAE+cOCHgs6e4u7vjesbf0VR03uptLi4u+NHyP6LebSQIQh8fH7vrsqddfG3/V0AB4IULF+Dh4WF3q4su5SKq4E8YPMDRfK8hKAbGhqdor7yteF7LtI9REbZEfHb37l0sXrzY7vr4BnkUUAD44MEDMTI5ODjg1KlTyMrKQnh4OIYNGwZXV1ecOXMGkyZNElPzjRs3EBMTg2nTpuHKqeNYWp4KRwcHszJuSeloyduH1qtHFGo1xSSibMwikPP9+PFjzJkzRx41uSd2K6AAsLCwEDU1NeIhu3btwr179zB9+nScPXtWgEh/x8fHY8WKFdiyZQu2bduGo0eP4vLJTMQ/+vw1gI5OcE3Ygbaic2g5m6ZoVOPUlSjymy8+Ky8vx5IlHaMhF30qoACQnI/6+noxAl6+fFmMfLGxsUKZ2tpaMT1XVlbC29sbjx49wqhRo1BaWoqSGxexqOhvcHw9APaoZl3Er1Do91PxfV1dHRYsWKBP5bnXQoEuTkhGRoYAcMiQITZLNGjQIAy5nw3UPrR+zwAPNExcimfPnqGiokJMvwQxF/0q0AVAGtnu37+PkpIStLS0iHc1AtLaggl9b0tpb28X025cXBymTJliyy18jeQKKACk6ZQAGT58uM3dNjwpRsmZ/+J56XWr9/j4+mHUh39BY2OjmMbDwsLsqsfmBvGFmlJAASDFAOn9zp5Sl/8Nwm/8AzQIUu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ICCgDpkHLLQmEZWhem5IObN29i4cKFSEtLEwdLUijmndLvlQAGvweXuBQ0ZWxEe9U9xbP4XBgGrtcRkC6gnEBfX19xLeX2UZCYHAhaGyavmOKBlD5PKVeehZkYY+O5MJTtYvKo+VwYhtGkQBcnhEIx586dM0NoTSo+F4ZB6qsC3W5KooeSN9z5RCxrlXXOlul8LY16UVFRdh+A2dcO8v39W4EeAezfzebWyaIAAyiLJTXaDwZQo4aTpdkMoCyW1Gg/GECNGk6WZjOAslhSo/1gADVqOFmazQDKYkmN9oMB1KjhZGk2AyiLJTXaDwZQo4aTpdkMoCyW1Gg/GECNGk6WZjOAslhSo/1gADVqOFmazQDKYkmN9oMB1KjhZGk2AyiLJTXaDwZQo4aTpdkMoCyW1Gg/GECNGk6WZjOAslhSo/1gADVqOFmazQDKYkmN9oMB1KjhZGk2AyiLJTXaDwZQo4aTpdkMoCyW1Gg/pAQwJ+cklvw8HmvWrkFAgC+SkhI1ah75my0lgGS2rKwTmBe3yGzBkNBALEv4EO9GR/LprP2Ia2kBJI1XrfoYX/7rq27kNuJnC+bho48SEB//i35kDv01RVoAr169isiIGACOZqt6enpgffIn8Pf3xqpVK/Vn7X7YY2kBDJ8QJf6tWFLSSgQE+mPdujWgf77DpX8pICWA5IT4+vqI/0fCpX8rICWA/Vtybp2lAgwg86CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAgygqvJz5QwgM6CqAv8HxK9U82bI7KMAAAAASUVORK5CYII=</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Randomizer" idx="1" x="-50" y="-50" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="1,0,10,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="51.54557291666666" y="10"><block s="receiveKey"><l><option>1</option></l></block><block s="gotoXY"><l>-50</l><l>-50</l></block><block s="doAsk"><l>Hello, what&apos;s your name!</l></block><block s="doSetVar"><l>name</l><block s="getLastAnswer"></block></block><block s="doSetVar"><l>random_number</l><block s="reportRandom"><l>1</l><l>10</l></block></block><block s="doHideVar"><l>random_number</l></block><block s="doAsk"><block s="reportJoinWords"><list><l>Hello </l><block var="name"/><l>, I&apos;ve picked a random number from 1 to 10. Guess the number and write it below in the text box!</l></list></block></block><block s="doSetVar"><l>guess</l><block s="getLastAnswer"></block></block><block s="doIfElse"><block s="reportEquals"><block var="random_number"/><block var="guess"/></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>You won! You guessed it on your first try! My number was </l><block var="random_number"/><l>.</l></list></block><l>2</l></block></script><script><block s="doSayFor"><block s="reportJoinWords"><list><l>Sorry, </l><block var="name"/><l>, but your guess is not correct.</l></list></block><l>2</l></block><block s="doUntil"><block s="reportEquals"><block var="random_number"/><block var="guess"/></block><script><block s="doAsk"><l>Keep Guessing!</l></block><block s="doSetVar"><l>guess</l><block s="getLastAnswer"></block></block><block s="doIfElse"><block s="reportEquals"><block var="random_number"/><block var="guess"/></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>You guessed it! My number was </l><block var="random_number"/><l>.</l></list></block><l>2</l></block></script><script><block s="doSayFor"><block s="reportJoinWords"><list><l>Sorry, </l><block var="name"/><l>, but your guess is not correct.</l></list></block><l>2</l></block></script></block></script></block></script></block></script><comment x="527" y="30.666666666666742" w="334" collapsed="false">What this first program does is that the sprite picks a random number using a built-in random number generator, and then I ask the user to try and guess the number, and once thir guess and th random number is equal, then they&apos;ve got it correct. Even I don&apos;t know the random number because I hid the variables I set the random number to, so it makes it quite interesting. In this first program, the program is started by pressing the 1 key. Then, I move the sprite to the appropriate location (-50,-50) so the text is centered. I then ask the user their name with the ask and wait block, and I always set my answer variables into my custom variables for solidity and clarity. Then, I set another variable to the random number, so once a random number is picked, I can have a variable that can easily be manipulated and used as the random number holder. I need to hide this variable or else the answer shows on the stage, so I use the hide variable block. Then, I ask the main question, which is to tell the user to guess a number from 1 to 10, and again, I use the ask and wait block. I refer to the user by their name, so I need to use a join block to join the variable that holds the user&apos;s name and the rest of the text. I set their answer to another variable by setting a custom made variable i to the answer variable, which is a built-in function that instantaneously assigns itself the value of whatever the user answered with. Next is the if statement to compare the random number to the user&apos;s guess. I use a conditional if else statement for this. The condition I use is a predicate block that determines a true of false statement. If it is true, then the if&apos;s action will occur, and if it is false, then it will move on to the else action. The condition is if my random number x is equal to their guess i. If they are equal, this means that the user had guessed the number correctly on their first try, so then in the if section, I use a say block to congratulate the user, tell them they guessed it on their first try, and tell them the random number (I need to use the join block to join together the variable that holds the random number and the text). If the predicate block is false, meaning the guess and the random number aren&apos;t equal, this means we move on to the else section. First, I use a say block to tell the user that their number is not correct, and I use a join block to join the name they inputed in the beginning. Next is a repeat until loop, and this is important because I want to keep asking the user to guess numbers UNTIL they get the correct one, which then I congratulate them and the program ends. The condition for the repeat until statement is exactly the same as the if statement (when their guess equals the random number), and inside that, I use the ask and wait block and I say &quot;Keep Guessing&quot; to tell the user to keep guessing. I need to set their new answer to the i variable every single time, so that is why I put another set block there or else the old i variable is just going to be compared. Lastly, I use another if statement with the same predicate block. How this works is that when the number is guessed correctly, not only will it say that the user guessed the number (I also give them the number by using the join block), the program will immediately end after that because as the program checks the repeat until block to see if it needs to run the loop again, it doesn&apos;t because the condition has finally been met, so after I congratulate the user, the program just terminates. If they guess it wrong, I say that their guess is not correct, referring to their name, and then the loop will repeat (allowing the user to guess again) because the condition hasn&apos;t been met yet. This program works quite eloquently. </comment><script x="53.66666666666663" y="609.0000000000005"><block s="receiveKey"><l><option>2</option></l></block><block s="gotoXY"><l>-50</l><l>-50</l></block><block s="doAsk"><l>Hello, what&apos;s your name!</l></block><block s="doSetVar"><l>name2</l><block s="getLastAnswer"></block></block><block s="doAsk"><block s="reportJoinWords"><list><l>Hello, </l><block var="name2"/><l>. This is the guessing game! I will pick a random number. The lowest possible number is 1, and the highest possible number is your choice! Type the maximum parameter in the text box below.  </l></list></block></block><block s="doSetVar"><l>maximum</l><block s="getLastAnswer"></block></block><block s="doSetVar"><l>random_number2</l><block s="reportRandom"><l>1</l><block var="maximum"/></block></block><block s="doHideVar"><l>random_number2</l></block><block s="doAsk"><l>Now guess the number! Write it below in the text box!</l></block><block s="doSetVar"><l>guess2</l><block s="getLastAnswer"></block></block><block s="doIfElse"><block s="reportEquals"><block var="random_number2"/><block var="guess2"/></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>You won! You guessed it on your first try! My number was </l><block var="random_number2"/><l>.</l></list></block><l>2</l></block></script><script><block s="doIf"><block s="reportGreaterThan"><block var="guess2"/><block var="random_number2"/></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>Sorry, </l><block var="name2"/><l>, but your guess is not correct. The number is lower.</l></list></block><l>2</l></block></script></block><block s="doIf"><block s="reportLessThan"><block var="guess2"/><block var="random_number2"/></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>Sorry, </l><block var="name2"/><l>, but your guess is not correct. The number is higher.</l></list></block><l>2</l></block></script></block><block s="doSetVar"><l>tries</l><l>1</l></block><block s="doUntil"><block s="reportEquals"><block var="random_number2"/><block var="guess2"/></block><script><block s="doAsk"><l>Keep Guessing!</l></block><block s="doSetVar"><l>guess2</l><block s="getLastAnswer"></block></block><block s="doChangeVar"><l>tries</l><l>1</l></block><block s="doIfElse"><block s="reportEquals"><block var="random_number2"/><block var="guess2"/></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>You guessed it! My number was </l><block var="random_number2"/><l>. You took </l><block var="tries"/><l> tries to guess the number.</l></list></block><l>2</l></block></script><script><block s="doIf"><block s="reportGreaterThan"><block var="guess2"/><block var="random_number2"/></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>Sorry, </l><block var="name2"/><l>, but your guess is not correct. The number is lower.</l></list></block><l>2</l></block></script></block><block s="doIf"><block s="reportLessThan"><block var="guess2"/><block var="random_number2"/></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>Sorry, </l><block var="name2"/><l>, but your guess is not correct. The number is higher.</l></list></block><l>2</l></block></script></block></script></block></script></block></script></block></script><comment x="543" y="822.6666666666654" w="338" collapsed="false">This program is quite similar to the program above except that the user can choose the maximum limit of the random number, I tell the user whether the number is higher or lower, and in the end, I tell the user how many guesses it took them to guess the number. First, this program is prompted when the user presses the 2 key. Then, I move the sprite to the appropriate location (-50,-50) using the go to block so that the text is centered. Next, I ask the user their name by using an ask and wait block, and I set their answer to the variable a (I use different variables for this program because these are completely separate programs, and I don&apos;t want to make it too confusing for what values the variables have, so I just create different variables that haven&apos;t been used for this program). Then, I use another ask and wait block, and I use a join block to greet them with their real name, then explain the game. I ask them to input the upper limit, and then I set their answer to the variable b. Then, I set a variable c to the random number the pick random block picks (built-in function), and it&apos;s extremely important that I set the upper limit to variable b, which has its value assigned as the user&apos;s answer from the previous question (this value is the user&apos;s opinion on the upper limit) so the user can pick the upper limit (lower limit is just going to be 1 because it doesn&apos;t make sense for it to be higher). I also need to hide variable c because that would reveal the answer. The reason I keep all the rest of the variables is so that there is some reference for the lowest and highest numbers possible, and the user would also be able to see their past guess as the game progresses, so that might help especially in this program when I tell the user whether their guess is higher or lower. Then, I use the ask and wait block again to tell the user to guess the number, and I set their answer to variable d. The concept from now on is similar to the program above in that I use an if else statement and that I use a predicate block to see whether the numbers are equal (if this is true, the if action is done, and if this is false, the else action is done). I use the variable that stores the random value c and the user&apos;s guess d and use the equal block in the Operators category to compare. If the user truly does guess the number on their first try, then the program goes to the if section, and I use a say block to congratulate the user on guessing the number their first try. I also reveal the random number, and to do this, I need to use a join block to join the variable that holds the random number and the text (by the way, for every say block, I use the default time, so it displays the message for 2 seconds). Next, if the user&apos;s guess isn&apos;t correct, we move on to the else action. The first thing I do is that I have two if statements, and these tell the user if their number is higher or lower than the random number. For the first one, if the user&apos;s guess is greater than c, then I tell the user the number is lower, because the random number is lower than the guessed number, which is higher. For the second one, if the guess is lower than the random number, then I say that the number is higher. For each one, I use a join block to refer to them by their name, and I say their guess is not correct. Then I tell them if their number is higher or lower. Only one can be true, so only one of the if statements will occur, which is logical, and if it&apos;s equal, then that would have been taken care of before (the user would have gotten it correct). Next, I need to do an extremely crucial thing, and this is to initiate/assign a new variable e to 1. This is the variable that will tell how many guesses the user has taken. I need to set variable e to 1 because the user has already made 1 guess, and it is wrong (the user is about to guess another time), so I initiate e to 1. In the repeat until loop that follows, each time the loop runs, I change the variable e by 1, so it adds 1 to e. This represents the number of guesses the user has taken, because each time the loop runs, the user guesses one time, so I add one to the variable e. Anyway, after I initiate variable e, I then have a repeat until loop with the same predicate block of c = d. This loop is guaranteed to run because the user&apos;s guess is inherently not equal to the random number (or else we wouldn&apos;t even have gotten to the else section). First, I use an ask and wait block and say &quot;Keep Guessing&quot;, and then I need to reassign the variable designated for the user&apos;s guess the new answer/guess. Then, I change e by 1 right after because this counts as one guess. Then, I use another if statement with the same exact predicate. If the guess is finally equal, then I use a say block and the program should end right after because the repeat until&apos;s predicate would also be met. The say block congratulates the user, tells them the random number, and tells the the number of tries it took. I do this by using the join block, and putting the variables that have stored these values in the correct location. The e variable should be how many guesses the user took, and it should be accurate because each time the user guesses, I add one to the number of guesses it takes to get the correct answer, and once they do get it correct, I put how many tries it took to guess it (this includes the guess where it is equal to the random number because I add one to variable e before the if statement). If the guess is still not equal, then we move on to the else action. It is the same exact thing as we did before the repeat unil loop. If their guess is greater than the random number, then I tell them their guess is not correct and that the number is lower. If their guess is lower than the random number, then I tell them that their guess is not correct and that the number is higher. I refer to their names, so I use a join block to join the variable that holds their name and the text. The repeat until loop should then repeat because they still havent&apos; guessed the random number, and it should keep repeating UNTIL they guess it. This program works beautifully.</comment></scripts></sprite><watcher var="name" style="normal" x="9" y="31.00000399999999" color="243,118,29"/><watcher var="guess" style="normal" x="10" y="10" color="243,118,29"/><watcher var="name2" style="normal" x="9" y="52.000005999999985" color="243,118,29"/><watcher var="maximum" style="normal" x="9" y="74.00000799999998" color="243,118,29"/><watcher var="guess2" style="normal" x="9" y="95.00001199999997" color="243,118,29"/><watcher var="tries" style="normal" x="11" y="115.00001399999996" color="243,118,29"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="Hello" type="command" category="control"><header></header><code></code><translations></translations><inputs></inputs></block-definition></blocks><variables><variable name="name"><l>Julia</l></variable><variable name="random_number"><l>9</l></variable><variable name="guess"><l>4</l></variable><variable name="name2"><l>Kyle</l></variable><variable name="maximum"><l>2</l></variable><variable name="random_number2"><l>1</l></variable><variable name="guess2"><l>1</l></variable><variable name="tries"><l>2</l></variable></variables></project><media name="2.4 Kyle Random Number" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>