diff --git a/middle-school/img/U1/lab04/rgb-pixel-empty.png b/middle-school/img/U1/lab04/rgb-pixel-empty.png new file mode 100644 index 0000000000..61070ca376 Binary files /dev/null and b/middle-school/img/U1/lab04/rgb-pixel-empty.png differ diff --git a/middle-school/img/U1/lab05/729-hex-reporting.png b/middle-school/img/U1/lab05/729-hex-reporting.png new file mode 100644 index 0000000000..ddaf357feb Binary files /dev/null and b/middle-school/img/U1/lab05/729-hex-reporting.png differ diff --git a/middle-school/img/U1/lab05/bin-of-dec-300-reporting.png b/middle-school/img/U1/lab05/bin-of-dec-300-reporting.png new file mode 100644 index 0000000000..2efbdb87db Binary files /dev/null and b/middle-school/img/U1/lab05/bin-of-dec-300-reporting.png differ diff --git a/middle-school/img/U1/lab05/bin-of-dec-60x5-reporting.png b/middle-school/img/U1/lab05/bin-of-dec-60x5-reporting.png new file mode 100644 index 0000000000..0a1d5a742b Binary files /dev/null and b/middle-school/img/U1/lab05/bin-of-dec-60x5-reporting.png differ diff --git a/middle-school/img/U1/lab05/bin-of-dec.png b/middle-school/img/U1/lab05/bin-of-dec.png new file mode 100644 index 0000000000..750abf68c4 Binary files /dev/null and b/middle-school/img/U1/lab05/bin-of-dec.png differ diff --git a/middle-school/img/U1/lab05/bin-of-hex.png b/middle-school/img/U1/lab05/bin-of-hex.png new file mode 100644 index 0000000000..fe74dd3d5a Binary files /dev/null and b/middle-school/img/U1/lab05/bin-of-hex.png differ diff --git a/middle-school/img/U1/lab05/bin-to-elec(dec-to-bin-10)-reporting.png b/middle-school/img/U1/lab05/bin-to-elec(dec-to-bin-10)-reporting.png deleted file mode 100644 index 2d979a2f5a..0000000000 Binary files a/middle-school/img/U1/lab05/bin-to-elec(dec-to-bin-10)-reporting.png and /dev/null differ diff --git a/middle-school/img/U1/lab05/bin-to-elec-reporting.png b/middle-school/img/U1/lab05/bin-to-elec-reporting.png deleted file mode 100644 index 37dea26492..0000000000 Binary files a/middle-school/img/U1/lab05/bin-to-elec-reporting.png and /dev/null differ diff --git a/middle-school/img/U1/lab05/bin-to-elec.png b/middle-school/img/U1/lab05/bin-to-elec.png deleted file mode 100644 index cd6f6dc8cb..0000000000 Binary files a/middle-school/img/U1/lab05/bin-to-elec.png and /dev/null differ diff --git a/middle-school/img/U1/lab05/dec-of-bin.png b/middle-school/img/U1/lab05/dec-of-bin.png new file mode 100644 index 0000000000..d69afa9ccc Binary files /dev/null and b/middle-school/img/U1/lab05/dec-of-bin.png differ diff --git a/middle-school/img/U1/lab05/dec-to-bin-300-reporting.png b/middle-school/img/U1/lab05/dec-to-bin-300-reporting.png deleted file mode 100644 index c8ee05e288..0000000000 Binary files a/middle-school/img/U1/lab05/dec-to-bin-300-reporting.png and /dev/null differ diff --git a/middle-school/img/U1/lab05/dec-to-bin-60x5-reporting.png b/middle-school/img/U1/lab05/dec-to-bin-60x5-reporting.png deleted file mode 100644 index 0c21dede2d..0000000000 Binary files a/middle-school/img/U1/lab05/dec-to-bin-60x5-reporting.png and /dev/null differ diff --git a/middle-school/img/U1/lab05/dec-to-bin.png b/middle-school/img/U1/lab05/dec-to-bin.png deleted file mode 100644 index fa329215d4..0000000000 Binary files a/middle-school/img/U1/lab05/dec-to-bin.png and /dev/null differ diff --git a/middle-school/img/U1/lab05/decoding-i-love-bjc-reporting.png b/middle-school/img/U1/lab05/decoding-i-love-bjc-reporting.png new file mode 100644 index 0000000000..72ac517f1d Binary files /dev/null and b/middle-school/img/U1/lab05/decoding-i-love-bjc-reporting.png differ diff --git a/middle-school/img/U1/lab05/elec-of-bin(bin-of-dec-10)-reporting.png b/middle-school/img/U1/lab05/elec-of-bin(bin-of-dec-10)-reporting.png new file mode 100644 index 0000000000..4e6a3ccb08 Binary files /dev/null and b/middle-school/img/U1/lab05/elec-of-bin(bin-of-dec-10)-reporting.png differ diff --git a/middle-school/img/U1/lab05/elec-of-bin-reporting.png b/middle-school/img/U1/lab05/elec-of-bin-reporting.png new file mode 100644 index 0000000000..7fa3510c5e Binary files /dev/null and b/middle-school/img/U1/lab05/elec-of-bin-reporting.png differ diff --git a/middle-school/img/U1/lab05/elec-of-bin.png b/middle-school/img/U1/lab05/elec-of-bin.png new file mode 100644 index 0000000000..09f0f05ddb Binary files /dev/null and b/middle-school/img/U1/lab05/elec-of-bin.png differ diff --git a/middle-school/img/U1/lab05/hex-of-bin.png b/middle-school/img/U1/lab05/hex-of-bin.png new file mode 100644 index 0000000000..ba1b8572f1 Binary files /dev/null and b/middle-school/img/U1/lab05/hex-of-bin.png differ diff --git a/middle-school/img/U1/lab05/message-i-love-bjc-shifted-by-3-reporting.png b/middle-school/img/U1/lab05/message-i-love-bjc-shifted-by-3-reporting.png new file mode 100644 index 0000000000..8923fd74c8 Binary files /dev/null and b/middle-school/img/U1/lab05/message-i-love-bjc-shifted-by-3-reporting.png differ diff --git a/middle-school/img/U1/lab05/unicode(unicode-BJC+3)as-letter-reporting.png b/middle-school/img/U1/lab05/unicode(unicode-BJC+3)as-letter-reporting.png new file mode 100644 index 0000000000..f1c6245571 Binary files /dev/null and b/middle-school/img/U1/lab05/unicode(unicode-BJC+3)as-letter-reporting.png differ diff --git a/middle-school/img/U1/lab05/unicode-66-reporting.png b/middle-school/img/U1/lab05/unicode-66-reporting.png new file mode 100644 index 0000000000..c5dd75df91 Binary files /dev/null and b/middle-school/img/U1/lab05/unicode-66-reporting.png differ diff --git a/middle-school/img/U1/lab05/unicode-B-reporting.png b/middle-school/img/U1/lab05/unicode-B-reporting.png new file mode 100644 index 0000000000..9a65266bbe Binary files /dev/null and b/middle-school/img/U1/lab05/unicode-B-reporting.png differ diff --git a/middle-school/img/U1/lab05/unicode-BJC+3-reporting.png b/middle-school/img/U1/lab05/unicode-BJC+3-reporting.png new file mode 100644 index 0000000000..051bd1a1bc Binary files /dev/null and b/middle-school/img/U1/lab05/unicode-BJC+3-reporting.png differ diff --git a/middle-school/img/U1/lab05/unicode-BJC-reporting.png b/middle-school/img/U1/lab05/unicode-BJC-reporting.png new file mode 100644 index 0000000000..0547c53b7c Binary files /dev/null and b/middle-school/img/U1/lab05/unicode-BJC-reporting.png differ diff --git a/middle-school/prog/numbers-bits-electricity.xml b/middle-school/prog/numbers-bits-electricity.xml index 86eccfd2f7..c4f9a685e8 100644 --- a/middle-school/prog/numbers-bits-electricity.xml +++ b/middle-school/prog/numbers-bits-electricity.xml @@ -1 +1 @@ -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAABDRJREFUeF7t2L9L1AEYx/HHQVNQKmgQBFtqajlxCJwSGtyyQQKF3PsjGnQLW230Hwi6RqE5CAp1aIgiSPphCUnckRBXF10p0Wng1688n++Hd+t9+T7P8/m8qOt62u12O/hDAkkJ9AAwKXnGdhIAIBBSEwBgavwMByAGUhMAYGr8DAcgBlITAGBq/AwHIAZSEwBgavwMByAGUhMAYGr8DAcgBlITAGBq/AwHIAZSEwBgavwMByAGUhMAYGr8DAcgBlITAGBq/AwHIAZSEwBgavwMByAGUhMAYGr8DAcgBlITAGBq/AwHIAZSEwBgavwMByAGUhMAYGr8DAcgBlITAGBq/AwHIAZSEwBgavwMByAGUhMAYGr8DAcgBlITAGBq/AwHIAZSEwBgavwMByAGUhMAYGr8DAcgBlITAGBq/AwHIAZSEwBgavwMLwRwZWUlNjc3u9Ib6O+Pm/PzMTw83Pns3vJybG9vdz3X19cXs3NzMTo6eiLPUWt1EigEcLxWi42Njc6V42dPx7OdL/sXP11bi1qt9vuzsbHYWF8/MI3DnivjfdWJn02PDfDJ1Ym4/OhxaQDLeB+1VieBwgBHPn2Ic6d64/ali7Hw/GV8bX2P+2+3oujfgCMf35f2vurEz6aFAU40d+JMX2/cunA+ll+9iW8/2nH3xevCACcan0t7H7VWJ4HCAPe+A5bxT+bf3xXLeF914mfTYwO8PjIcD95tlfYdsIz3UWt1Ejg2wH9PLfod8Kj/W/7f3OrEz6YAxEBqAoUAzs3Oxu7ubtfizUYj7iwt7f8OeGNmJlqtVtdzv36cXlhcjCuTk53Pyn4uNVGGHymBQgDr9XpMT093DVr/86Pz3g/RD+v1uHbAc6urq9Fut2NqaqrzjrKfO1ICPJyaAABT42c4ADGQmgAAU+NneCGAzWYzBgcHu9Lb+4/JwMBA57PDnms0Gp3Ph4aGTuQ5aq1OAoUAVuc8NlVPAIDqDZnvB0DzgtXPA6B6Q+b7AdC8YPXzAKjekPl+ADQvWP08AKo3ZL4fAM0LVj8PgOoNme8HQPOC1c8DoHpD5vsB0Lxg9fMAqN6Q+X4ANC9Y/TwAqjdkvh8AzQtWPw+A6g2Z7wdA84LVzwOgekPm+wHQvGD18wCo3pD5fgA0L1j9PACqN2S+HwDNC1Y/D4DqDZnvB0DzgtXPA6B6Q+b7AdC8YPXzAKjekPl+ADQvWP08AKo3ZL4fAM0LVj8PgOoNme8HQPOC1c8DoHpD5vsB0Lxg9fMAqN6Q+X4ANC9Y/TwAqjdkvh8AzQtWPw+A6g2Z7wdA84LVzwOgekPm+wHQvGD18wCo3pD5fgA0L1j9PACqN2S+HwDNC1Y/D4DqDZnvB0DzgtXPA6B6Q+b7AdC8YPXzAKjekPl+ADQvWP08AKo3ZL4fAM0LVj8PgOoNme8HQPOC1c/7CZAJrsaDyRJxAAAAAElFTkSuQmCC forward turn turnLeft setHeading doFaceTowards gotoXY doGotoObject doGlide changeXPosition setXPosition changeYPosition setYPosition bounceOffEdge xPosition yPosition direction doSwitchToCostume doWearNextCostume getCostumeIdx reportGetImageAttribute reportNewCostume reportNewCostumeStretched doSayFor bubble doThinkFor doThink changeEffect setEffect getEffect clearEffects changeScale setScale getScale show hide reportShown goToLayer goBack doScreenshot reportCostumes alert log playSound doPlaySoundUntilDone doPlaySoundAtRate doStopAllSounds reportGetSoundAttribute reportNewSoundFromSamples doRest doPlayNote doPlayFrequency doSetInstrument doChangeTempo doSetTempo getTempo changeVolume setVolume getVolume changePan setPan getPan playFreq stopFreq reportSounds clear down up getPenDown setColor setPenHSVA changePenHSVA getPenAttribute setBackgroundColor setBackgroundHSVA changeBackgroundHSVA changeSize setSize doStamp floodFill write reportPenTrailsAsCostume reportPentrailsAsSVG doPasteOn doCutFrom receiveInteraction receiveGo receiveKey receiveMessage receiveCondition doBroadcast doBroadcastAndWait getLastMessage doSend doWait doWaitUntil doForever doRepeat doUntil doFor doIf doIfElse reportIfElse doStopThis doRun fork evaluate doReport doCallCC reportCallCC doTellTo reportAskFor receiveOnClone createClone newClone removeClone doPauseAll doWarp reportTouchingObject reportTouchingColor reportColorIsTouchingColor reportAspect reportStackSize reportFrameCount reportYieldCount reportThreadCount doAsk reportLastAnswer getLastAnswer reportMouseX reportMouseY reportMouseDown reportKeyPressed reportRelationTo doResetTimer reportTimer getTimer reportAttributeOf reportObject reportURL doSetGlobalFlag reportGlobalFlag reportDate reportGet reportAudio doSetVideoTransparency reportVideo reportLessThan reportGreaterThan reportEquals reportAnd reportOr reportNot reportBoolean reportJoinWords reportTextSplit reportLetter reportStringSize reportUnicode reportUnicodeAsLetter reportIsA reportIsIdentical reportJSFunction reportRandom doSetVar doChangeVar doShowVar doHideVar doDeleteAttr doDeclareVariables reportNewList reportNumbers reportCONS reportListItem reportCDR reportListAttribute reportListIndex reportConcatenatedLists reportReshape reportListContainsItem reportListIsEmpty doForEach reportMap reportKeep reportFindFirst reportCombine doAddToList doDeleteFromList doInsertInList doReplaceInList
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAEbZJREFUeF7t3TGI3gcdx+HfXSLUQYpoA61CKdYWrAiNQxENDTiKzoIObkVd3Ds0BUF3bcHNRRd1rQ5WIkEXRQRBUQSdLLSiRasOxjtJWwRrzHvvvW/6uf8/T8BF3/e+9z7v7+WTNEc9GL8IECBAgACBN13g4E1fNEiAAAECBAiMADsCAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAICHCAbpIAAQIECAiwGyBAgAABAoGAAAfoJgkQIECAgAC7AQIECBAgEAgIcIBukgABAgQICLAbIECAAAECgYAAB+gmCRAgQICAALsBAgQIECAQCAhwgG6SAAECBAgIsBsgQIAAAQKBgAAH6CYJECBAgIAAuwECBAgQIBAInOkAn5+5dDTz0X26HM48f33m2oav+enDmUsz84d9bB/N3DuvbX7D7j5EfQ0CBAgsX+BMB/hw5srBzOMzc3lP1FePZ354NHPlVl/vcOZrxzMPH762vfOvo5mrBzO/OZp5wu7OnL4AAQIEViGwhAA/tU/p45mnTxDgpw42RHrb78nutmIeT4AAgXULCPBN3t/DGQHe8e5P8huOHSc8nQABAosWWHyAP3bvhfnOhy/OF3/521f/s+nXScJwlgO8pte76b3yvxMgQGDNAosP8FcuPjKfffD++d0rf5/3Pnd143u19ACv6fVufLM8gAABAisWWHyAn/ngI/PEe+6cAK/p9a74c+WlESBAYKOAAC/s74AFeONNewABAgQWISDAAjzV33kv4hPimyRAgMBtEhBgARbg2/Th8mUJECBwK4HFBPgLDz0wX/7Aw3P+8HCrd/S7L7w4H7/20/88Zyk/hHUnvN6t3kgPJkCAwMoEFhPg5y8/No9feMfW/NePjuaub39vcQG+E17v1m+mJxAgQGBFAosJ8H1vvWs+cd+FOXfw39/yZx549zz69rvnlX9enyd/8ev/eWt+9Mc/z89f/sviAnwnvN4VfY68FAIECGwtsJgA/79XtqafCj7JD0Ot6fVufa2eQIAAgRUJCPBN3syThHDbG9jX3z0L8LbyHk+AAIGzKSDAAuynoM/mZ9N3RYDAygUEWIAFeOUfci+PAIGzKbD4AD/9/ofmyfc9OD/508vzoe//eKPyvv5R8MahNzxgX7trer3bGno8AQIE1iSw+ADf/Zbz86n73zXPvfDi/P5v/9j43uwrhBuHblOA1/R6tzX0eAIECKxJYPEB3vbNWHqA1/R6t30tHk+AAIE1CQjwwv4OeNvjO8u/4dj2tXg8AQIE1iQgwALsh7DW9In2WggQWIyAAAuwAC/m4+obJUBgTQICLMACvKZPtNdCgMBiBARYgAV4MR9X3ygBAmsSEGABFuA1faK9FgIEFiMgwAIswIv5uPpGCRBYk8ASAvy5mblnT+gvHc88ezRz5VZf79zMt45nLh/MvHMfu8czfz2e+dXxzGN29yHqaxAgQGD5AksI8D3/mnlmH9TnZj5/PPPSpgAfznxpZt52NPPVfewezHx9Zq4fz3zkVl/vTtvdh62vQYAAgaUKnPkA34DdFMyT4h++/iffTV/vxv8d4cwcbHrcSXcPZn4wM4c3/lS9IcB31O5J/TyOAAECaxQQ4Ju8qwK826mf9Dccu614NgECBJYtIMAC/OoPYRV/4l/2R8d3T4AAgd0EBFiABXi3z5BnEyBA4FQCAizAAnyqj44nESBAYDcBARZgAd7tM+TZBAgQOJWAAAuwAJ/qo+NJBAgQ2E1AgAVYgHf7DHk2AQIETiUgwAIswKf66HgSAQIEdhMQYAEW4N0+Q55NgACBUwkIsAAL8Kk+Op5EgACB3QQEWIAFeLfPkGcTIEDgVAJnOsAzc/H1V/WzU726Nzzp/MylG//V9ZlrG77eozf+zVAzs5fdmfnkjX8X9Mx80+4+3klfgwABAssXOOsBXr6wV0CAAAECBG4iIMDOggABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAgLsBggQIECAQCAgwAG6SQIECBAgIMBugAABAgQIBAICHKCbJECAAAECAuwGCBAgQIBAICDAAbpJAgQIECAgwG6AAAECBAgEAgIcoJskQIAAAQIC7AYIECBAgEAgIMABukkCBAgQICDAboAAAQIECAQCAhygmyRAgAABAv8GTKJwlqbvqXAAAAAASUVORK5CYII=
\ No newline at end of file +data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAAiVJREFUeF7t0sEJACAAAzHdf+gKLnGfdIHCkbttxxSIClwAo/JufwEAQUgLAJjmdw4gA2kBANP8zgFkIC0AYJrfOYAMpAUATPM7B5CBtACAaX7nADKQFgAwze8cQAbSAgCm+Z0DyEBaAMA0v3MAGUgLAJjmdw4gA2kBANP8zgFkIC0AYJrfOYAMpAUATPM7B5CBtACAaX7nADKQFgAwze8cQAbSAgCm+Z0DyEBaAMA0v3MAGUgLAJjmdw4gA2kBANP8zgFkIC0AYJrfOYAMpAUATPM7B5CBtACAaX7nADKQFgAwze8cQAbSAgCm+Z0DyEBaAMA0v3MAGUgLAJjmdw4gA2kBANP8zgFkIC0AYJrfOYAMpAUATPM7B5CBtACAaX7nADKQFgAwze8cQAbSAgCm+Z0DyEBaAMA0v3MAGUgLAJjmdw4gA2kBANP8zgFkIC0AYJrfOYAMpAUATPM7B5CBtACAaX7nADKQFgAwze8cQAbSAgCm+Z0DyEBaAMA0v3MAGUgLAJjmdw4gA2kBANP8zgFkIC0AYJrfOYAMpAUATPM7B5CBtACAaX7nADKQFgAwze8cQAbSAgCm+Z0DyEBaAMA0v3MAGUgLAJjmdw4gA2kBANP8zgFkIC0AYJrfOYAMpAUATPM7B5CBtACAaX7nADKQFgAwze8cQAbSAgCm+Z0DyEBaAMA0v3MAGUgLAJjmdw4gA2kBANP8zgFkIC0AYJrf+QOC496obByqTwAAAABJRU5ErkJggg== forward turn turnLeft setHeading doFaceTowards gotoXY doGotoObject doGlide changeXPosition setXPosition changeYPosition setYPosition bounceOffEdge xPosition yPosition direction doSwitchToCostume doWearNextCostume getCostumeIdx reportGetImageAttribute reportNewCostume reportNewCostumeStretched doSayFor bubble doThinkFor doThink changeEffect setEffect getEffect clearEffects changeScale setScale getScale show hide reportShown goToLayer goBack doScreenshot reportCostumes alert log playSound doPlaySoundUntilDone doPlaySoundAtRate doStopAllSounds reportGetSoundAttribute reportNewSoundFromSamples doRest doPlayNote doPlayFrequency doSetInstrument doChangeTempo doSetTempo getTempo changeVolume setVolume getVolume changePan setPan getPan playFreq stopFreq reportSounds clear down up getPenDown setColor setPenHSVA changePenHSVA getPenAttribute setBackgroundColor setBackgroundHSVA changeBackgroundHSVA changeSize setSize doStamp floodFill write reportPenTrailsAsCostume reportPentrailsAsSVG doPasteOn doCutFrom receiveInteraction receiveGo receiveKey receiveMessage receiveCondition doBroadcast doBroadcastAndWait getLastMessage doSend doWait doWaitUntil doForever doRepeat doUntil doFor doIf doIfElse reportIfElse doStopThis doRun fork evaluate doReport doCallCC reportCallCC doTellTo reportAskFor receiveOnClone createClone newClone removeClone doPauseAll doWarp reportTouchingObject reportTouchingColor reportColorIsTouchingColor reportAspect reportStackSize reportFrameCount reportYieldCount reportThreadCount doAsk reportLastAnswer getLastAnswer reportMouseX reportMouseY reportMouseDown reportKeyPressed reportRelationTo doResetTimer reportTimer getTimer reportAttributeOf reportObject reportURL doSetGlobalFlag reportGlobalFlag reportDate reportGet reportAudio doSetVideoTransparency reportVideo reportLessThan reportGreaterThan reportEquals reportAnd reportOr reportNot reportBoolean reportJoinWords reportTextSplit reportLetter reportStringSize reportUnicode reportUnicodeAsLetter reportIsA reportIsIdentical reportJSFunction reportRandom doSetVar doChangeVar doShowVar doHideVar doDeleteAttr doDeclareVariables reportNewList reportNumbers reportCONS reportListItem reportCDR reportListAttribute reportListIndex reportConcatenatedLists reportReshape reportListContainsItem reportListIsEmpty doForEach reportMap reportKeep reportFindFirst reportCombine doAddToList doDeleteFromList doInsertInList doReplaceInList receiveOnScene doSwitchToScene reifyScript reifyReporter reifyPredicate
Takes a text string as input, and reports a new text string containing all but the last letter of the input.
resulti1
Takes a text string as input, and reports the last character in the string.
0
Reports the portion of the first input (string) starting at the position given by the second input (counting from 1, like LETTER n OF) and ending at the position given by the third input (also counting from 1). If the third input is empty, reports the portion from the first position to the end of the string. If a position number is negative, counts from the end backward, so -1 is the last character, -2 is the next to last, etc.
pt:o texto de _ entre as posições _ e _ , inclusive
55
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==
\ No newline at end of file diff --git a/middle-school/student-pages/01-functions-data.html b/middle-school/student-pages/01-functions-data.html index cc5e8b84b7..0a6a9fc45b 100644 --- a/middle-school/student-pages/01-functions-data.html +++ b/middle-school/student-pages/01-functions-data.html @@ -47,4 +47,4 @@

Lab 6: Dealing with Data Dos

- \ No newline at end of file + diff --git a/middle-school/student-pages/U1/L3/02-visualizing-data.html b/middle-school/student-pages/U1/L3/02-visualizing-data.html index efbca614dd..c44ac07821 100644 --- a/middle-school/student-pages/U1/L3/02-visualizing-data.html +++ b/middle-school/student-pages/U1/L3/02-visualizing-data.html @@ -18,7 +18,7 @@

Visualizing Data

Digitizing Your Data

    -
  1. Open this project in Snap! and save it to your account. (You'll need to log in if you aren't logged in already.)
  2. +
  3. Open this Visualizing Data project in Snap!, and save it to your account. (You'll need to log in if you aren't logged in already.)
diff --git a/middle-school/student-pages/U1/L5/01-numbers-computers.html b/middle-school/student-pages/U1/L5/01-numbers-computers.html index 11c90ff9bc..e8cb071f51 100644 --- a/middle-school/student-pages/U1/L5/01-numbers-computers.html +++ b/middle-school/student-pages/U1/L5/01-numbers-computers.html @@ -75,7 +75,7 @@

Numbers Systems for Humans vs. Machines

10s place
1s place

- The number 239 is equal to (2 × 100) + (3 × 10) + (9 × 1). You could write it in Snap! like this to show how base 10 works:
+ The number 239 is equal to (2 × 100) + (3 × 10) + (9 × 1). You could write it in Snap! like this:
((2 × 100) + (3 × 10)) + (9 × 1) reporting 239 @@ -90,7 +90,7 @@

Numbers Systems for Humans vs. Machines

: Binary Numerals

A binary numeral is part of the base 2 system.

-

In base 2, there are twp digits (0-1), and each place is worth twice times as much as the place to its right.

+

In base 2, there are two digits (0-1), and each place is worth twice times as much as the place to its right.

For example, consider the binary numeral 1010...

@@ -117,20 +117,20 @@

Numbers Systems for Humans vs. Machines

place values in decimal 3761: 3 1000's 7 100's 6 10's 1 1's - In base 10 notation, each place value represents a power of ten: the units place (100 = 1), the tens place (101 = 10), the hundreds place (102 = 100), the thousands place (103 = 1000), etc. So, for example:

-

3761   =   3 × 103  +  7 × 102  +  6 × 101  +  1 × 100 + In base 10 notation, each place value represents a power of ten: the units place (100 = 1), the tens place (101 = 10), the hundreds place (102 = 100), the thousands place (103 = 1000), etc. So, for example: +

+

3761   =   3 × 103  +  7 × 102  +  6 × 101  +  1 × 100

place values in binary 10010: 1 16's 0 8's 0 4's 1 2's 0 1's Base 2 uses the same idea but with powers of two instead of powers of ten. Binary place values represent the units place (20 = 1), the twos place (21 = 2), the fours place (22 = 4), the eights place (23 = 8), the sixteens place (24 = 16), etc. So, for example:

100102   =   1 × 24  +  0 × 23  +  0 × 22  +  1 × 21  +  0 × 20   =   16  +  2   =   1810

- -
+
I think the above "reading" exercise should include a few more numbers and the below ITIT needs more support for writing in binary. --MF, 9/22/21
  1. Try writing a number in binary and see if a friend can convert back to your original number. If they have trouble, go through both calculations (yours and theirs) together. If they succeed in finding your original number, try a bigger number!
  2. diff --git a/middle-school/student-pages/U1/L5/02-bits-electricity.html b/middle-school/student-pages/U1/L5/02-bits-electricity.html index 864edf62b1..a78375a85b 100644 --- a/middle-school/student-pages/U1/L5/02-bits-electricity.html +++ b/middle-school/student-pages/U1/L5/02-bits-electricity.html @@ -19,9 +19,9 @@

    Storing Numbers in Bits

    1. If your project isn't open already, log in to Snap! and open your "Numbers Bits Electricity" project.
    2. - Drag the  decimal → binary () block into the main area. You can type decimal numbers directly into that block or you can even drag your previous calculations into the block.
      - decimal → binary (300) reporting 100101100 - decimal → binary (60 × 5) reporting 100101100 + Drag the  binary of decimal () block into the main area. You can type decimal numbers directly into that block or you can even drag your previous calculations into the block.
      + binary of decimal (300) reporting 100101100 + binary of decimal (60 × 5) reporting 100101100
    3. Talk with Your Partner @@ -46,13 +46,13 @@

      Storing Bits as Electricity

      For the binary number 1010, we could imagine the computer storing it like this:
      four drawings of capacitors with charges: +, none, +, none

      -

      The binary → electric () block will help you visualize how the computer stores any binary number.

      +

      The electric of binary () block will help you visualize how the computer stores any binary number.

      1. - Drag the binary → electric block into the Scripts area, and experiment with it. You can type binary numbers directly into that block, or you can drag in a decimal to binary block. Try both ways.
        - binary → electric (1010) reporting four drawings of capacitors with charges: +, none, +, none - binary → electric (decimal → binary (10)) reporting four drawings of capacitors with charges: +, none, +, none + Drag the electric of binary block into the Scripts area, and experiment with it. You can type binary numbers directly into that block, or you can drag in a decimal to binary block. Try both ways.
        + electric of binary (1010) reporting four drawings of capacitors with charges: +, none, +, none + electric of binary (binary of decimal (10)) reporting four drawings of capacitors with charges: +, none, +, none
      2. Talk with Your Partner diff --git a/middle-school/student-pages/U1/L5/03-hex-rgb-colors.html b/middle-school/student-pages/U1/L5/03-hex-rgb-colors.html index 3c3aa0f835..442e9a8717 100644 --- a/middle-school/student-pages/U1/L5/03-hex-rgb-colors.html +++ b/middle-school/student-pages/U1/L5/03-hex-rgb-colors.html @@ -3,78 +3,25 @@ - Unit 1 Lab 5: Storing and Securing Data, Activity 5 + + + + Unit 1 Lab 5: Storing and Securing Data, Activity 3

        Hexadecimal Numerals and RGB Colors

        -
        In this activity, you
        - -

        Another Number System Used with Computers

        - -

        Typing long strings of ones and zeros is inconvenient and prone to error. A more efficient method is to use hexadecimal (base 16). One hex digit represents any whole number between 0 an 15. So eight digits of binary can be translated into two digits of hexadecimal, which is much easier and much less error-prone for humans.

        -
        Mary should fix up the CSS in these tables some day. --MF, 12/18/17
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Eight bits in base two...
        2726252423222120
        128s place64s place32s place16s placeeights placefours placetwos placeones place
        ...is two digits in base 16.
        161160
        sixteens placeones place

        - - - - - - - - - - - - - - - - - - -
        For example: 12110 = 011110012 = 7916
        01111001
        79
        - - -

        +

        In this activity, you will learn another number system commonly used by computer programmers.
        + +

        An Easier Computer Number System to Type

        +
        The prefix hexa- means "six" like the word hexagon (a polygon with 6 sides), and since decimal is a base 10 system, hexadecimal is a base 16 system.
        +

        You've learned about decimal numerals (the base 10 system with ten digits, 0-9, that uses powers of ten for place values) and binary numerals (the base 2 system with two digits, 0 and 1, that uses powers of two for place values).

        +

        Another common number system used with computers is hexadecimal...

        + +
        : Hexadecimal Numerals
        - Place value notation uses only one digit in each place. We need to represent 0 through 15, and we have digits for 0-9, so we choose A-F for the remaining values: - + The letters A-F are used for the values 10-15: +
        @@ -93,357 +40,149 @@

        Another Number System Used with Computers

        10 11
        - In base 16, there are sixteen digits (0-9 and A-F), and each place is worth sixteen times the place to its right. One hex digit has 16 possible values, the equivalent of four binary digits (bits).
        - place values in hexadecimal 3B7: 3 256's 11 16's 7 1's

        - -
        Mary, you reduced this katex with a style tag (not proper CSS) because you couldn't figure out how to make it work with CSS. Fix this later. --MF, 12/18/17
        -

        This stands for 3 \times 256 + 11\times 16 +7\times 1 or 951.

        - - - -
        -
          -
        1. - Talk with Your Partner - - Watch this Hexadecimal and Binary Timer Snap! program run. The top row counts in binary, the middle in decimal, the bottom in hex. Write a description of the hex counter's behavior.
          - Hexadecimal timer
        2. -
        +

        A hexadecimal numeral is part of the base 16 system.

        +

        In base 16, there are sixteen digits (0-9 and A-F), and each place is worth sixteen times as much as the place to its right.

        +
        +

        For example, consider the hexadecimal numeral 2D9...

        +
        +
        +
        2
        +
        D
        +
        9
        +
        256s place
        +
        16s place
        +
        1s place
        +

        + We can figure out the decimal equivalent by adding up the 2 two-hundred-fifty-sixes, the D (that is, 13) sixteens, and the 9 ones: (2 × 256) + (13 × 16) + (9 × 1) = 729. + You could write it in Snap! like this:
        + (((2 × 256) + (13 × 16)) + (9 × 1) reporting 729 +
        +
        -

        Reading Hexadecimal

        -
        -

        - - Base 16 uses powers of sixteen instead of powers of two or ten. Place values in hexadecimal represent the units place (160 = 1), the sixteens place (161 = 16), the two hundred fifty-sixes place (162 = 256), the four thousand ninety-sixes place (163 = 4096), etc. So, for example: -

        -

        3B16   =   3 × 161  +  11 × 160   =   48  +  11   =   5910

        -
        - - - -
        -

        To translate from hexadecimal (for example, 7B316) to base 10, first, write the digits on paper. Then write out the hexadecimal place values: start at the right with 1, then write 16 in the next place to the left, then write 256 (which is 162), and so on. Each new place will be worth 16 times the one to its right.

        -
        - Remember: A-F cover the digits after 9: - - - - - - - - - - - - - - - - - -
        101112131415
        ABCDEF
        -
        - - - - - - - - - - - - - - -
        7B3
        256161
        - right-to-left arrow -
        -

        So, 7B316 = (7 × 256) + (11 × 16) + (3 × 1) = 1792 + 176 + 3 = 197110.

        -
        -
        -
          -
          - FF16
          - = (15 × 161 + 15 × 160)10
          - = (15 × 16 + 15)10
          - = 25510 -
          -
        1. Translate these hexadecimal numerals into base 10 notation: +
            +
          1. Talk with Your PartnerFind the decimal representation for these hexadecimal numerals:
              -
            1. AF16
            2. -
            3. 5D16
            4. -
            5. 1816
            6. -
            7. 3E816
            8. +
            9. C0
            10. +
            11. 96
            12. +
            13. 3F
            -
            A numeral such as 11 means eleven in the usual decimal notation, or three if it is a binary numeral, or seventeen in hexadecimal notation. The only way you know that the "18" in part (c) above doesn't mean eighteen is that subscript "16" means hexadecimal.
          2. +
            + Need help reading hexadecimal? +
            +

            + place values in hexadecimal 3B7: 3 256's 11 16's 7 1's + Base 16 uses powers of sixteen instead of powers of two or ten. Place values in hexadecimal represent the units place (160 = 1), the sixteens place (161 = 16), the two-hundred-fifty-sixes place (162 = 256), etc. So, for example: +

            +

            3B716   =   3 × 162  +  11 × 161  +  7 × 160   =   768  +  176  +  7   =   95110

            +
            +
        + - -

        Writing Hexadecimal

        -
        -

        To translate from base 10 (for example, 29910) to base 16, first write out the hexadecimal place values by multiplying by 16 moving left from the units place until you get to a value larger than your number (4096 for this example). Then think, "My number is smaller than 4096, so I leave that place blank. But I can subtract two hundred fifty-six once, so I write a 1 there, and there's 43 left. Now, I can subtract two sixteens, and there's 11 left. And 11 is B in hex."

        - - - - - -
        299
        43
        11
        0
        - - - - - - - - - - - - - - - - -
        - right-to-left arrow -
        4096256161
         12B
        -

        Now, read the number off: 12B16 = 29910.

        -
        - - - -
        -
          -
        1. Translate these decimal numerals to hexadecimal notation: -
            -
          1. 59
          2. -
          3. 144
          4. -
          5. 229
          6. -
          7. 316
          8. -
          +

          Hexadecimal vs. Binary

          +

          Computers store information in binary as on and off signals (ones and zeros), but for computer programmers, +typing long strings of ones and zeros is inconvenient and prone to typos. Hexadecimal (also known as "hex") numbers require less typing and are easier to type correctly.

          +

          Since 16 is a power of 2 (24 = 16), 4 bits fit inside one hex digit. For example, the binary numeral 1101 is (1 × 8) + (1 × 4) + (0 × 2) + (0 × 1) = 13 in decimal or just D in hex.

          + +
          +
            +
          1. + Watch this counter. The top row shows binary, the middle shows decimal, and the bottom shows hex.
            + Hexadecimal timer
          -
          - -

          Notice that the algorithms for converting between binary and decimal are the same as the algorithms for converting between hexadecimal and decimal. These algorithms can be used to convert to and from any base.

          - -
          -
            -
          1. - Talk with Your Partner - This algorithm runs into a problem after base 36. What's the problem and what's the solution? -
          2. -
          3. Convert 29910 to base 7.
          4. -
          -
          In the future, consider moving 8.3.3 and 8.3.4 here as TIF and removing from 8.3. --MF, 12/1/17
          - - -
          BJC page 2 (currently cut):
          - -

          More About Hexadecimal

          -
          -

          BH: SCRAP. Two pages on... hexadecimal??

          -
          - -
          There is commented out content on this page that probably could be removed. --MF, 2/26/18
          - -

          We can pack four bits (binary digits) into one hexadecimal digit because 16 is a power of two (16 = 24). So, a group of four bits represents a value between 0 and 15, and one hex digit also represents values from 0-15 (using 0-9 and A-F). This makes it easier to translate between binary and hex than between other bases.

          -

          Hexadecimal is an abstraction over binary: we use hexadecimal to abbreviate binary in a more readable way.

          -
          -

          You can create a table like this whenever you need one.

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          binaryhex
          00002016
          00012116
          00102216
          00112316
          01002416
          01012516
          01102616
          01112716
          10002816
          10012916
          10102A16
          10112B16
          11002C16
          11012D16
          11102E16
          11112F16
          -
          -

          Translating between Binary and Hex

          -
          -

          To translate a binary numeral (for example, 11010111012) to hexadecimal, start by splitting it into groups of four bits, from right to left (like this: 11 0101 1101).

          -

          Then determine the value of each group and write the corresponding hex digit (look it up on the table at right).

          -

          For example: 112 = 316, 01012 = 516, and 1101 = D16. So, 11010111012 = 35D16.

          -
          -
          -
            -
          1. Translate these binary numerals to hexadecimal notation: +
            +
              +
            1. Talk with Your PartnerWrite a description of the counter's behavior.
            2. +
            3. Find the hexadecimal representation for these decimal numerals:
                -
              1. 1110112
              2. -
              3. 11011112
              4. -
              5. 101100012
              6. +
                2F16, B916, 11216
                +
              7. 47
              8. +
              9. 185
              10. +
              11. 290
            - - -
            -

            To translate a hex numeral (like 4E116) to binary, write each hex digit as a group of four bits (including any leading zeros).

            -

            For example: 416 = 01002, E16 = 11102, and 116 = 00012. So, 4E116 = 0100111000012 or just 100111000012 because we can drop the leading zero once the digits are all in their places.

            -
            +
            -
            In practice, you rarely change number bases by hand, except of course on the AP exam. Once you understand the basic principles of these representations, it's perfectly fine to use a Binary to Decimal to Hexadecimal Converter.
            -
              -
            1. Translate these hexadecimal numerals to binary notation: -
                -
              1. 1816
              2. -
              3. 5D16
              4. -
              5. F816
              6. -
              -
            2. -
            -
            - - - -

            Hexadecimal Colors

            -
            -

            A pixel is a single dot of color on the computer screen. It's short for "picture element."

            -
            -

            Computers have several ways of representing color depending on the purpose. For example, three-color RGB (red, green, blue) is used for screen display, and four-color CMYK (cyan, magenta, yellow, black) is used for printing. On a computer screen, each pixel that makes up a picture is assigned an RGB color code that defined by the intensity of red, green, and blue in that color. These three color intensities each range from 0 to 255 (one byte is used for each of the three colors), which is 00 to FF in hex notation.

            -

            If (R, G, B) = (128, 0, 255), the color is purple: some red and as much blue as possible, but no green at all. If all three colors are as bright as possible (all are 255), we see white; if they are as dark as possible (all are 0), we see black. Instead of writing (255, 255, 255) for white and (128, 0, 255) for purple, we often use hex notation: FFFFFF and 8000FF. And this color is red 255, green 127, and blue 0, which is FF7F00 in hex.

            -
            - Learn more about color codes. -
            -

            Sometimes a fourth number is used to represent the color transparency, like the ghost effect you used in your very first BJC project on Unit 1 Lab 1 Page 3: Make It a Game.

            -

            RGB works well for lights, such as the tiny lights (pixels) in your computer screen, so it is great for computers. But it's not good for printers: no combination of Red, Green and Blue sprayed on paper would quite make black, zero of each would leave the paper white (not black), and artists know that mixing red and green paint does not make yellow (but that's how you make yellow with light: FFFF00). Ink or paint colors are measured in CMYK: Cyan, Magenta, Yellow, and Black. And some colors such as brown and brick-red (darker than pure red) are hard to figure out in RGB units, even for display in lights. Another color system is called HSB, for hue, saturation, brightness.

            -

            Snap!'s system is similar to HSB. "Pen color" is hue (location on the rainbow), and "pen shade" is more or less saturation (zero means black, 100 means full rainbow color).

            -
            +
              +
            1. Use the Snap! blocks binary of hex () and hex of binary () in your "Numbers Bits Electricity" project to check your work on the problems above.
            2. +
              +

              Click for a hint about using Snap! to check your work with hex.

              +
              +

              You will need to nest the binary and hex conversion blocks above with the  binary of decimal () and decimal of binary () blocks in order to get from hex to decimal.

              +
              +

              Why do the input slots to binary of hex and hex of binary have different shapes?

              +
              +

              Snap! uses the shape of the input slot to tell Snap! and the programmer what kind of inputs are expected. +

                +
              • + A round slot means that the input should be a number, such as: + + RGB pixel, red: (85) green: (170) blue: (255) +
              • +
              • + A picture of a list means that the input should be a list, such as: + + draw pixel 'list input slot' +
              • +
              • + A long rectangular slot means that the input should be a text, such as: + + fancy () +
              • +
              • + A short rectangular slot slot means that the input can be anything, such as: + join +
              • +
              + While  binary of decimal (), decimal of binary (), and hex of binary () all take digits 0-9 as input (or just 0 and 1), the binary of hex () block takes numbers that can include letters as digits, so that block needs an a more flexible slot for the hex input to allow for numbers that might include letters as digits. +

              +
              +
              +
            - + + +

            Hexadecimal and RGB Colors

            +

            The three color values of RGB pixels each range from 0 to 255 because eight bits are used for each of the three colors and 28 = 256. But in hexadecimal, 162 = 256, so it only takes two hex digits to represent each of the RGB color values (0 to 255 in decimal is 00 to FF in hex).

            +

            As you've seen, if all three color values are as bright as possible, we see white, and if they are as dark as possible, we see black. Instead of writing (255, 255, 255) for white and (0, 0, 0) for black, we often use hex notation: FFFFFF and 000000.

            + +

            Also (128, 0, 255) = 8000FF is the color is purple: some red (128 = 8016) and as much blue as possible (255 = FF16), but no green at all (0 = 0016). And this color is red 255, green 127, and blue 0, which is FF7F00 in hex.

            -
              +
              1. Represent these colors in hex notation:
                  -
                1. red 0, green 149, and blue 235
                2. -
                3. red 128, green 90, and blue 0
                4. -
                5. red 163, green 0, and blue 84
                6. +
                7. (10, 120, 255)
                8. +
                9. (220, 10, 220)
                10. +
                11. (60, 255, 60)
              2. -
              3. Predict what this RGB color will look like based on its values: red 145, green 0, blue 226.
              4. -
              5. Predict what this hex RGB color will look like: 04FF61.
              6. -
              7. Another way to represent colors is by their names. For example, the color 4B0082 is called Indigo and the color 8B4513 is called SaddleBrown. Compare these two representations (hex RGB codes vs. color names) in terms of: space required, ease of understanding, and ease of use.
              8. -
              9. Why do we use binary, decimal, and hexadecimal? Why not just one?
              10. -
              11. In earlier units, we used abstraction to describe creating custom blocks and abstract data types. Here, we use abstraction to talk about hexadecimal vs. binary. How can abstraction describe these very different things? What do these things have in common?
            -
              -
            1. Explore this RGB/HEX color converter: http://hex.colorrrs.com/
            2. -
            3. Play with this Interactive Color Wheel
            4. -
            5. Read more about RGB colors and hexadecimal notation.
            6. -
            -
            -
            They have not seen the Libraries page referenced in this TIF. --MF, 6/13/19
            -
            -
              -
            1. -
              As in all Snap! blocks, the numeric input slots take values represented in base 10 (not hex). Each color component has a value between 0 and 255.
              - Load the Snap! RGB library into one of your projects to explore RGB color further. In the File menu, choose "Libraries..." and then choose "Set RGB or HSV pen color" as shown on the Libraries page.
              - This will give you a new "Pen" block: - set pen color to r: (255) g: (0) b: (0)
              - Snap! 'Import library' dialog box highlighting 'Set RGB or HSV pen color' library -
            2. +
                +
              1. + Learn more about hex notation for RGB colors: + +
            - -
            In this activity, you
            +
            In this activity, you learned about hexadecimal notation, how it relates to binary, and how it is used to represent RGB color values.
            diff --git a/middle-school/student-pages/U1/L5/04-secret-messages.html b/middle-school/student-pages/U1/L5/04-secret-messages.html index 54c461f622..8ca282f8be 100644 --- a/middle-school/student-pages/U1/L5/04-secret-messages.html +++ b/middle-school/student-pages/U1/L5/04-secret-messages.html @@ -3,20 +3,13 @@ - Unit 1 Lab 5: Storing and Securing Data, Activity 3 + Unit 1 Lab 5: Storing and Securing Data, Activity 4

            Secret Messages

            -
            "Apply multiple methods of encryption to model the secure transmission of information. - Encryption can be as simple as letter substitution or as complicated as modern methods used to secure networks and the Internet. Students should encode and decode messages using a variety of encryption methods, and they should understand the different levels of complexity used to hide or secure information. For example, students could secure messages using methods such as Caesar cyphers or steganography (i.e., hiding messages inside a picture or other data). They can also model more complicated methods, such as public key encryption, through unplugged activities. - Practice(s): Developing and Using Abstractions: 4.4"
            -
            +
            In this activity, you will write and decode secret messages and learn about simple substitution ciphers.
            -
            -

            In this lab, you will learn about security risks on the Internet and how data can be encoded to protect it.

            -

            On this page, you will experiment with different ways of encoding and decoding a message and learn a simple method of symmetric encryption.

            -

            Messages sent across the Internet need to be secure so that they can't be read by computers along the way.

              @@ -24,12 +17,14 @@

              Secret Messages

            • Decryption is the process of decoding data.
            -

            There are many ways to encrypt information...

            - + + +

            Creating an Encoding Scheme

            1. Write a secret message, invent some way of encoding the message, and then give the encoded message to someone else.
            2. -
            3. Try to decode the message you receive. What strategies are you using to decode it?
            4. + Talk with Your Partner +
            5. Try to decode the message you receive. What strategies are you using to decode it?
            6. With other students, compare the methods you used to encode your messages. Was anyone able to decode the message they received? If so, how?
            7. If anyone wasn't able to decode the message they received, discuss how to decode that message and then let them decode it.
            @@ -51,19 +46,20 @@

            Caesar Cipher

            1. - Decode this message using the Caesar cipher shown above:
              + Decode this message using the Caesar cipher key shown above:
              FDHVDU'V PHVVDJHV ZHUHQ'W YHUB VHFXUH.
              CAESAR'S MESSAGES WEREN'T VERY SECURE.
            2. - The following message was also encoded using a Caesar cipher but with a shift of 11 instead of a shift of 3. Write out a key for messages with a shift of 11, and decode this message:
              + The following message was also encoded using a Caesar cipher but with a shift of 11 instead of a shift of 3. Write out a key for messages with a shift of 11, and then decode this message:
              SZH NZFWO JZF XLVP L MPEEPC NTASPC?
              HOW COULD YOU MAKE A BETTER CIPHER?
            3. +
            4. Write a secret message, choose a Caesar cipher shift value, write a key for that shift value, encode the message with that key, and give the encoded message to another student to decode. If they want an extra challenge, do not give them the shift value or the key.
            -
              +
              1. This message was also made with a Caesar cipher. Can you decode it?
                PIAWLTY EZ JZFC NWLDDXLEPD SZH JZF OPNZOPO ESTD XPDDLRP. @@ -73,7 +69,7 @@

                Caesar Cipher

            -
              +
                Talk with Your Partner
              1. Discuss how to decode a Caesar cipher even if you don't know the shift.
              2. How could you encode a message more securely?
              3. @@ -87,23 +83,24 @@

                Other Simple Substitution Ciphers

                PQVFUBZOTHWYELIXRNAMGDSCKJThis is the key.

                -
                  +
                  1. Decode this message using the simple substitution cipher shown just above:
                    VTXOUNA PNU UPAK MI VNPVW.
                    CIPHERS ARE EASY TO CRACK.
                  2. +
                  3. Write another secret message, create a simple substitution cipher key, encode the message with that key, and give the encoded message to another student to decode. If they want an extra challenge, do not give them the key.
                -
                  +
                    Talk with Your Partner
                  1. If you intercepted a message that was created with a simple substitution cipher, how might you decode it without knowing the key?
                  2. What are some ways the sender and receiver could make the encryption more secure than a simple substitution cipher?
                -
                +
                In this activity, you learned about Caesar ciphers and the more general simple substitution cipher, and you decoded and encoded messages using both ciphers.
                diff --git a/middle-school/student-pages/U1/L5/05-caesar-cipher.html b/middle-school/student-pages/U1/L5/05-caesar-cipher.html index 296f6c74be..962f35ed19 100644 --- a/middle-school/student-pages/U1/L5/05-caesar-cipher.html +++ b/middle-school/student-pages/U1/L5/05-caesar-cipher.html @@ -3,51 +3,159 @@ - Unit 1 Lab 5: Storing and Securing Data, Activity 4 + Unit 1 Lab 5: Storing and Securing Data, Activity 5 -

                Programming a Caesar Cipher

                - - -
                -
                  -
                1. Talk with Your Partner Describe an algorithm for decoding a message that was created with a shift cipher.
                2. -
                -
                - - -
                - Add to TG -
                  -
                1. - A simple substitution cipher is relatively easy to break because some letters are used more frequently than others. - -
                2. -
                3. Read "Secret Keys and One-Time Pads" (Blown to Bits pages 169-173) to learn about Vigenère ciphers and methods used during World War 2 and the Cold War.
                4. -
                -
                - - -
                On this page, you will program a shift cipher procedure to encrypt/decrypt text.
                -

                - Computers store keyboard characters (capital and small letters, punctuation marks, space, digits, symbols, and so on) as numbers called Unicode. This table shows the Unicode for some of the keyboard characters:
                +

                Programming a Caesar Cipher

                +
                + In this activity, you will write a program to encode and decode messages using a Caesar (shift) cipher.
                + message ('I love BJC!') shifted by (3) reporting 'L#oryh#EMF$' + message ('L#oryh#EMF$') shifted by (-3) reporting 'I love BJC!' +
                + + +

                Exploring Unicode

                +

                To shift the letters in a message, you need a way to add the shift value to each letter. Computers store characters (letters, digits, symbols, etc.) as numbers called Unicode. So you can change the characters of a message into Unicode, add to make the shift, and then change the Unicode back into letters.

                +

                + This table shows the Unicode for some familiar characters:
                Unicode Table

                The unicode of block reports the number that is used for a particular character:
                - unicode of (a) reporting '97'
                + unicode of (B) reporting '66' +

                +

                The unicode as letter block reports the character that a given Unicode number represents:
                - unicode (65) as letter reporting 'A' + unicode (66) as letter reporting 'B'

                  -
                1. Experiment with the unicode of and unicode as letter blocks. Try changing a word into Unicode, telling the Unicode to a friend, and then having them change it back into a word.
                2. +
                3. Open this Caesar Cipher project, and save it to your account.
                4. +
                5. Experiment with the unicode of and unicode as letter blocks. Write down the Unicode numbers for one word, give them to another student, and translate someone else's Unicode back into a word.
                6. +
                +
                + + +

                Working with Lists

                +

                + If you type more than one character into the input slot of unicode of, it will report a list of the Unicode characters of those letters:
                + unicode of (BJC) reporting the list {66, 74, 67} +

                +

                + You can shift all the letters in that list at once by using the list as the input to the () + () block:
                + (unicode of (BJC)) + (3) reporting the list {69, 77, 70} +

                +

                + The unicode as letter block can also accept a list as input. It will report a list of the characters for those Unicode numbers:
                + unicode (unicode of (BJC) + 3) as letter reporting the list {B, J, C} + +

                +
                +
                  +
                1. Use the Unicode blocks to encode and decode a word: +
                    +
                  1. Type a whole word into unicode of.
                  2. +
                  3. Use the () + () block to shift the values.
                  4. +
                  5. Use unicode as letter to translate the shifted Unicode back into characters.
                  6. +
                  7. Then give your encoded message to another student. If they want a challenge, don't give them the shift value. If they don't want that challenge today, give them your shift value too.
                  8. +
                  9. Use the same Snap! blocks to decode someone else's encoded message. + +
                  10. +
                  +
                2. +
                3. + Talk with Your Partner + Discuss how you decoded the message you received, and listen to how other people decoded their message. +
                    +
                  • What parts of the process were the same and what parts were different?
                  • +
                  • What could you need to change to make a general process that will work for all mesages and shift values?
                  • +
                  +
                4. +
                5. +
                  You learned how to create a new block that takes inputs on the Refining the Story page of the Super Short Stories lab.
                  + Create a block that takes a message and a shift value as input and reports the same message shifted by that value.
                  + message () shifted by () + +
                6. +
                7. Test it your block by encoding and decoding a few messages, and fix any problems.
                8. +
                +
                +

                Joining Elements of a List

                +

                So, you can use unicode of to change a string of text into Unicode, and you can use unicode of letter to change a list of Unicode back into a list of characters, but you don't want your program to output a list of characters, you want it to output the translated message as a string of text.

                + + +
                You used join in the Refining the Story activity of the Super Short Stories Lab.
                +

                + You have used join to join text or characters into a single string of text.
                + join (random animal) (s) +

                +

                The join block looks like it only takes one or more individual items as input, but it can also take a list as input and join all the elements. + + ; you could type them in, or you could drag in blocks that report things you want to join together. But unicode as letter reports a single list with all the characters you'll want to join inside. So you need a way to combine all the characters in the list using join...

                + + +

                How to Combine Elements of a List

                +

                You can use combine 'list input slot' using 'reporter input slot' to apply the join function to all the elements in a list.

                + + +

                The combine 'list input slot' using 'reporter input slot' block takes two inputs: a list and an operation with two inputs, and it reports the result of combining all the elements in the input list using the input operation. For example, the expression below reports: 0 + 1 + 2.
                + combine (list {0, 1, 2}) with (()+()) reporting 3 +

                + +
                +

                You choose the operation, and combine performs that operation by combining all the items in the input list and then reports the result.

                +

                Notice that the function used to combine the list items always has two blank input slots. The keep block only needs one blank in its input function, but with combine, two are required.

                +
                +
                +

                Combine is a higher order function; it is a function that takes a function as input. You've seen another higher order function already: keep (in Unit 2 Lab 3).

                +

                + Unlike keep, the combine function is only used with a few input functions. + Which functions? +

                +

                + Combine is mostly used with only these functions:
                + + ×
                + and or
                + join join words
                + and the maximum of () () and minimum of () () blocks you've just written yourself. +

                +

                + Why so few? +

                + The function has to be associative, meaning that it can't matter what order you group the items in. For example, addition is associative: (7 + 8) + 1 is the same as 7 + (8 + 1) (work it out yourself), but subtraction is not: (7 − 8) − 1 is different from 7 − (8 − 1). + So expressions like combine with (-) items of (list 7 8 1) would be ambiguous. +
                +

                +
                +

                +
                + +

                Putting It All Together

                +
                +
                  +
                1. Try changing a word into Unicode, telling the Unicode to a friend, and then having them change it back into a word.
                2. On paper, use a shift cipher to encrypt and decrypt a short message to get a feel for how this cipher works.
                3. Write a shift cipher procedure that works for any input text and any shift value.
                4. @@ -116,7 +224,25 @@

                  Programming a Caesar Cipher

                +
                +
                  +
                1. Talk with Your Partner Describe an algorithm for decoding a message that was created with a shift cipher.
                2. +
                +
                +
                + Add to TG +
                  +
                1. + A simple substitution cipher is relatively easy to break because some letters are used more frequently than others. + +
                2. +
                3. Read "Secret Keys and One-Time Pads" (Blown to Bits pages 169-173) to learn about Vigenère ciphers and methods used during World War 2 and the Cold War.
                4. +
                +
                diff --git a/middle-school/teaching-guide/U1/05-storing-securing-data.html b/middle-school/teaching-guide/U1/05-storing-securing-data.html index 0e1fede3f8..e94760a7dc 100644 --- a/middle-school/teaching-guide/U1/05-storing-securing-data.html +++ b/middle-school/teaching-guide/U1/05-storing-securing-data.html @@ -8,7 +8,7 @@

                Lab 5: Storing and Securing Data

                -

                Having learned that images are stored as lists of pixels, which are themselves lists, students now dig deeper to understand what's under that...

                +

                Having learned that images are stored as lists of pixels, which are themselves lists, students now dig deeper to understand how computers store that data as bits. In activities 1-3, students explore mathematical functions in Snap!, learn about binary representation (and optionally also hexadecimal), and they learn that computers use binary to store data in on/off electrical signals. In activities 4 and 5, students encode and decode messages and learn about substitution ciphers both offline and in Snap!.

                Pacing

                @@ -18,10 +18,10 @@

                Pacing

              4. Daily Activity: Computing in the News 5–15 minutes each day
              5. Activity 1: Numbers and Computers: 10–65 minutes
              6. Activity 2: Bits and Electricity: 15–50 minutes
              7. +
              8. (Optional) Activity 3: Hexadecimal Numerals and RGB Colors: 20–55 minutes
              9. +
              10. Activity 4: Secret Messages: 35–125 minutes
              11. Additional Lab 5 activities coming soon....
                @@ -60,7 +60,7 @@

                Activity 1: Numbers and Computers. 

                Activity Plan:
                  -
                • Optionally, spend one class period working through the CS Unplugged: How binary digits work activity. (45 minutes)
                • +
                • Optionally, spend one class period working through the CS Unplugged: How binary digits work activity. (approximately 45 minutes, if used)
                • Crunching Numbers: Students build and run several arithmetic operations in Snap!. (5–10 minutes)
                • Numbers Systems for Humans vs. Machines: Students learn the basic distinction between decimal and binary notation of numbers and convert from decimal to binary. (5–10 minutes)
                @@ -126,14 +126,21 @@

                Activity 2: Bits and Electricity. 

              12. Activity Plan:
                  -
                • Storing Numbers in Bits: Students use a  decimal → binary () block to discuss several questions about binary representation designed to deepen understanding. (5–10 minutes)
                • -
                • Storing Bits as Electricity: Students use a binary → electric () block to visualize how binary numerals are stored as electric signals on capacitors (10–20 minutes)
                • -
                • Optionally, wrap up your treatment of binary with "Binary Bingo." (approximately 20 minutes). Call numbers using the Bingo caller Snap! project. Students can convert numbers using the decimal → binary block.
                • +
                • Storing Numbers in Bits: Students use a binary of decimal () block to discuss several questions about binary representation designed to deepen understanding. (5–10 minutes)
                • +
                • Storing Bits as Electricity: Students use a electric of binary () block to visualize how binary numerals are stored as electric signals on capacitors (10–20 minutes)
                • +
                • Optionally, wrap up your treatment of binary with "Binary Bingo." Call numbers using the Bingo caller Snap! project. Students can convert numbers using the binary of decimal block. (approximately 20 minutes, if used)
              13. Tips:
                  +
                • + For additional resources on binary... + +
                • If you have time after students answer the questions on the student activity page in their pairs, you may wish to discuss the various "Talk with Your Partner" questions as a class:
                    @@ -155,6 +162,7 @@

                    Activity 2: Bits and Electricity. 

                • +
                • Be mindful not to say "binary number" or "decimal number." Binary and decimal are notations, and the instances of those notations are numerals, not numbers. It's the same number no matter how it's represented.
              14. @@ -253,25 +261,141 @@

                Activity 2: Bits and Electricity. 

            -
            Additional Lab 5 activities coming soon....
            -
            - Links to the unfinished student pages...
              -
            • Hexadecimal Numerals and RGB Colors (mostly just a copy of CSP version so far; will be optional here)
            • -
            • Secret Messages (mostly finished for middle school)
            • -
            • Programming a Caesar Cipher (mostly just a copy of CSP version so far)
            • + + ↑ Back to Top +

              Activity 3: Hexadecimal Numerals and RGB Colors. 

              +
              +
                +
              • Materials: Hexadecimal Numerals and RGB Colors
              • +
              • + Prepare: +
                  +
                • This activity is optional, review it and decide whether you will use it with your students.
                • +
                • If you are not familiar with hexadecimal carefully read and work through the exercises on the student activity page before class.
                • +
                +
              • +
              • + Learning Goals: +
                  +
                • Understand the basics of reading hexadecimal numerals.
                • +
                • Appreciate how RGB colors are written with hexadecimal.
                • +
                +
              • +
              • + Activity Plan: +
                  +
                • An Easier Computer Number System to Type: Building on their understanding of binary representation students learn about hexadecimal number representation and convert several hex numbers to decimal. (10–20 minutes)
                • +
                • Hexadecimal vs. Binary. Students learn about the relationship between binary and hex and watch an animation of a counter counting in binary, decimal, and hexadecimal. Optionally, you may choose to have students write out their observations about the counter and/or translate decimal into hex. (5–20 minutes)
                • +
                • Hexadecimal and RGB Colors. Students learn about RGB color values can be represented with hex and translate several RGB colors into hex. (5–15 minutes)
                • + +
                +
              • +
              • + Tips: + +
              • +
              • + Standards: +
                  +
                • 2-DA-07: Represent data using multiple encoding schemes.
                • +
                +
              • +
              • + Solutions +
                +
                  +
                • + Find the decimal representation for these hexadecimal numerals: +
                    +
                  • C016 = 192
                  • +
                  • 9616 = 150
                  • +
                  • 3F16 = 63
                  • +
                  +
                • +
                • + Find the hexadecimal representation for these decimal numerals: +
                    +
                  • 47 = 2F16
                  • +
                  • 185 = B916
                  • +
                  • 290 = 11216
                  • +
                  +
                • +
                • Represent these colors in hex notation: +
                    +
                  1. (10,120,255)= 0A78FF
                  2. +
                  3. (220, 10, 220) = DC0ADC
                  4. +
                  5. (60, 255, 60) = 3CFF3C
                  6. +
                  +
                • +
                +
                +
              • +
              +
              + + ↑ Back to Top +

              Activity 4: Secret Messages. 

              +
              +
                +
              • Materials: Secret Messages
              • +
              • + Prepare: +
                  +
                • Note that this entire activity is offline.
                • +
                +
              • +
              • + Learning Goals: +
                  +
                • Encode and decode messages using a variety of encryption methods, and they should understand the different levels of complexity used to hide or secure information. For example, students could secure messages using methods such as Caesar cyphers or steganography (i.e., hiding messages inside a picture or other data).
                • +
                +
              • +
              • + Activity Plan: +
                  +
                • Creating an Encoding Scheme: Optionally, students begin with an offline activity of creating message encoding schemes and attempting to decode someone else's encoded message. (20–40 minutes, if used)
                • +
                • Caesar Cipher: Students decode and encode secret messages using a Caesar cipher, discuss decoding Caesar ciphers, and brainstorm about stronger encoding schemes. (25–55 minutes)
                • +
                • Other Simple Substitution Ciphers: Students decode and encode messages using more general simple substitution ciphers, and optionally, discuss decoding simple substitution cipher without knowing the key and brainstorm further about stronger encoding schemes. (10–30 minutes)
                • +
                +
              • +
              • + Tips: +
                  +
                • This activity begins with an optional "If There Is Time" set of exercises in which students
                • +
                +
              • +
              • + Standards: +
                  +
                • 2-NI-06: Apply multiple methods of encryption to model the secure transmission of information.
                • +
                +
              • +
              • + Solutions +
                +
                  +
                • FDHVDU'V PHVVDJHV ZHUHQ'W YHUB VHFXUH. → CAESAR'S MESSAGES WEREN'T VERY SECURE.
                • +
                • SZH NZFWO JZF XLVP L MPEEPC NTASPC? → HOW COULD YOU MAKE A BETTER CIPHER?
                • +
                • PIAWLTY EZ JZFC NWLDDXLEPD SZH JZF OPNZOPO ESTD XPDDLRP. → EXPLAIN TO YOUR CLASSMATES HOW YOU DECODED THIS MESSAGE.
                • +
                • VTXOUNA PNU UPAK MI VNPVW. → CIPHERS ARE EASY TO CRACK.
                • +
                +
                +
              - - - - +
            +