diff --git a/docs/test/courses/csintro/about.md b/docs/test/courses/csintro/about.md
index fbc76d15c74..8b9eade8d4b 100644
--- a/docs/test/courses/csintro/about.md
+++ b/docs/test/courses/csintro/about.md
@@ -7,4 +7,4 @@ You can follow him on Twitter at [@dkiang](http://twitter.com/dkiang).
![Mary Kiang](/static/courses/csintro/mary-kiang-foto.png)
-Mary Kiang has been teaching for over twenty-five years at elementary, middle, and high school levels. She also developed curriculum in the Education Department of the Museum of Science in Boston. She currently teaches 6th grade Math/Science at Punahou School. Mary is a former programmer for Houghton Mifflin and Dun & Bradstreet and holds a Master’s degree in Elementary Education from Simmons College. Mary is the founder of GO Code!, an organization that supports girls and young women in exploring coding and STEM.
+Mary Kiang has been teaching for over twenty-five years at elementary, middle, and high school levels. She also developed curriculum in the Education Department of the Museum of Science in Boston. She currently teaches 6th grade Math/Science at Punahou School. Mary is a former programmer for Houghton Mifflin and Dun & Bradstreet and holds a Master’s degree in Elementary Education from Simmons College. Mary is the founder of GO Code!, an organization that supports girls and young women in exploring coding and STEM.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/accelerometer.md b/docs/test/courses/csintro/accelerometer.md
new file mode 100644
index 00000000000..1cbefc027cb
--- /dev/null
+++ b/docs/test/courses/csintro/accelerometer.md
@@ -0,0 +1,32 @@
+# Accelerometer
+
+![Acceleration Example](/test/static/courses/csintro/accelerometer/highvelocitylowaccel.png)
+
+This unit introduces the accelerometer functionality of the micro:bit. Even if one is unfamiliar with the word “accelerometer,” most people are aware of the function. The micro:bit accelerometer measures how the micro:bit is positioned and moving through space. The unplugged activity has the students sense their own body’s way of knowing its position and movement through space. The birdhouse activity leads the students to use the micro:bit’s accelerometer capabilities to create a program that reminds them to stand up every so often. This unit’s project is to create a “multi-tool” that uses a combination of different sensors using the accelerometer to solve a problem or serve a purpose.
+
+
+## Lesson objectives
+
+You will...
+
+* Understand how to use the Accelerometer blocks to sense the micro:bit’s position and movement in three-dimensional space
+* Understand the x, y, z axes and measurement of gravitational force
+* Apply the above knowledge and skills to design a unique program using the accelerometer
+
+## Lesson structure
+
+* Introduction: Understanding the Accelerometer
+* micro:bit Activity: Marco Polo & Morse Code
+* Project: Radio
+* Assessment: Rubric
+* Standards: Listed
+
+## Lesson plan
+
+1. [**Overview**: Understanding the Accelerometer](/test/courses/csintro/accelerometer/overview)
+2. [**Activity**: Stand for Health](/test/courses/csintro/accelerometer/activity)
+3. [**Project**: Accelerometer project](/test/courses/csintro/accelerometer/project)
+
+## Related standards
+
+[Targeted CSTA standards](/test/courses/csintro/accelerometer/standards)
\ No newline at end of file
diff --git a/docs/test/courses/csintro/accelerometer/activity.md b/docs/test/courses/csintro/accelerometer/activity.md
new file mode 100644
index 00000000000..362ffaf2c43
--- /dev/null
+++ b/docs/test/courses/csintro/accelerometer/activity.md
@@ -0,0 +1,267 @@
+# Coding Activity: Stand for Health!
+
+In our modern world, most of us sit for long stretches of time without ever getting up to stretch our legs. Standing up every so often is good for our physical health.
+
+We will use the micro:bit’s accelerometer to create a program that will let us know if we have been sitting too long.
+
+1. Inside the Variables Toolbox: Create a variable to keep track of how much time has passed since the program started.
+ - Name the variable **TimeStarted**.
+ - Place the newly created ‘**set TimeStarted**’ block inside the ‘**on start**’ block.
+ - Set the value of this variable to **0 (zero)** each time the program starts.
+
+```block
+let TimeStarted = 0
+```
+
+2. From the Logic toolbox: Get and place an ‘**if…else**’ block inside the ‘**forever**’ block.
+ - From the Logic toolbox: Get and place a **comparison** block into the ‘**true**’ space in the ‘**if**’ line of code.
+ - From the Input Toolbox: Get and place the **acceleration** block into the **left side of the comparison block**.
+ - In the **acceleration** block: Change the default value of ‘x’ to ‘z’.
+ - Set the **comparison** block symbol to ‘**less than**’ (<).
+ - Set the value on the **right-hand side of the comparison block** to **-700**.
+
+```block
+basic.forever(function () {
+ if (input.acceleration(Dimension.Z) < -700) {
+
+ } else {
+
+ }
+})
+
+```
+## Check for Understanding
+
+This line of code tells the micro:bit to forever check the acceleration of the micro:bit and if the value of acceleration is less than -700, do something.
+
+Remember that when the micro:bit is lying flat on a surface with the screen pointing up:
+
+ x is 0, y is 0, z is -1023, and strength is 1023.
+
+If the micro:bit is lying face up and flat, the Z value will be in this negative range. When your program is done, you can experiment with this number value, making it greater or less than the value used here to see how changing the value affects how the micro:bit reacts.
+
+3. From the Basic Toolbox: Get two ‘show leds’ blocks.
+ - Place one ‘show leds’ block under the ‘if’ line of code.
+ - Make an image of a chair in this block to indicate sitting. (Feel free to change it to an image that works for you.)
+ - Place the other ‘show leds’ block under the ‘else’ line of code.
+ - Make an image of a person standing in this block. (Feel free to change it to an image that works for you.)
+
+```block
+basic.forever(function () {
+ if (input.acceleration(Dimension.Z) < -700) {
+ basic.showLeds(`
+ # . . . .
+ # . . . .
+ # # # # .
+ # . . # .
+ # . . # .
+ `)
+ } else {
+ basic.showLeds(`
+ . . # . .
+ # # # # #
+ . . # . .
+ . # . # .
+ . # . # .
+ `)
+ }
+})
+
+```
+
+## Check for Understanding
+
+Now our micro:bit will show the chair image if the micro:bit is lying face up and flat, and a person standing image if the position of the micro:bit changes from lying flat and face up.
+
+Now, we will add in the time variable to keep track of how long we have been sitting.
+
+4. From the Logic toolbox: Get and place an ‘**if**’ block directly under the first ‘**show leds**’ block.
+ - From the Logic toolbox: Get and place a **comparison** block into the ‘**true**’ space in this ‘if’ line of code.
+ - From the Math Toolbox: Get and place an **operation** block into the **left side of the comparison block**.
+ - From the Input…more Toolbox: Get and place a ‘**running time(ms)**’ block into the **left side of the math operation block**.
+ - Set the **math operation** to **minus (-)**.
+ - From the Variables Toolbox: Get and place a ‘**TimeStarted**’ block into the **right side of the math operations block**.
+ - Set the **comparison** block symbol to ‘**greater than**’ **(>)**.
+ - Set the value on the **right-hand side of the comparison block** to **10000** (ten seconds).
+
+```block
+basic.forever(function () {
+ if (input.acceleration(Dimension.Z) < -700) {
+ let TimeStarted = 0
+ basic.showLeds(`
+ # . . . .
+ # . . . .
+ # # # # .
+ # . . # .
+ # . . # .
+ `)
+ if (input.runningTime() - TimeStarted > 10000) {
+
+ }
+ } else {
+ basic.showLeds(`
+ . . # . .
+ # # # # #
+ . . # . .
+ . # . # .
+ . # . # .
+ `)
+ }
+})
+```
+
+## Check for Understanding
+
+This if statement tells the micro:bit to check the difference between when we started the program and now. If the difference between when the program started and now is greater than 10 seconds, do something.
+
+We will have the micro:bit flash a message to indicate that you have been sitting longer than the desired time.
+
+NOTE: We’re using 10 seconds here for demonstration and testing purposes. In reality, you would want to set the time somewhere closer to half an hour, which is 1,800,000 milliseconds.
+
+5. From the Loops Toolbox: Get and place a ‘**repeat**’ block under the **if statement** we just created.
+ - From the Basic Toolbox: Get one ‘**show leds**’ block, one ‘**clear screen**’ block, and two ‘**pause**’ blocks.
+ - Place the ‘**show leds**’ block inside the ‘**repeat**’ block.
+ - Create an arrow image or an image of your choosing in this block. This image will flash on the micro:bit screen to alert the user that it’s time to stand up!
+ - Place one of the ‘**pause**’ blocks below this ‘**show leds**’ block.
+ - Place the ‘**clear screen**’ block just below the ‘**pause**’ block.
+ - Place the second ‘**pause**’ block just below the ‘**clear screen**’ block.
+
+
+
+```blocks
+basic.forever(function () {
+ if (input.acceleration(Dimension.Z) < -700) {
+ let TimeStarted = 0
+ basic.showLeds(`
+ # . . . .
+ # . . . .
+ # # # # .
+ # . . # .
+ # . . # .
+ `)
+ if (input.runningTime() - TimeStarted > 10000) {
+ for (let index = 0; index < 4; index++) {
+ basic.showLeds(`
+ . . # . .
+ . # # # .
+ # . # . #
+ . . # . .
+ . . # . .
+ `)
+ basic.pause(100)
+ basic.clearScreen()
+ basic.pause(100)
+ }
+ }
+ } else {
+ basic.showLeds(`
+ . . # . .
+ # # # # #
+ . . # . .
+ . # . # .
+ . # . # .
+ `)
+ basic.pause(100)
+ basic.clearScreen()
+ basic.pause(100)
+ }
+})
+```
+
+In addition to this flashing image, let’s add a message!
+
+6. From the Basic Toolbox: Get and place a ‘**show string**’ block below the ‘**repeat**’ loop block.
+ - Write a short message reminding the user to stand up!
+ - When the user stands up, they will see the person standing image.
+ - In case the user sits back down again, we need to reset the **TimeStarted** variable to the current program runtime.
+ - From the Variables Toolbox: Get and place a ‘**set TimeStarted**’ block just below the image of the person standing in the else section of the code.
+ - From the Input…more Toolbox: Get and place a ‘**running time(ms)**’ block into the right side of the ‘**set TimeStarted**’ block.
+
+Note: You can also manually restart the program each time you sit back down by pressing the micro:bit’s reset button or by turning the battery pack on and off (if your battery pack has an on/off switch.)
+
+
+## Complete program
+
+Here is the complete Stand Up! program:
+
+```blocks
+let TimeStarted = 0
+basic.forever(function () {
+ if (input.acceleration(Dimension.Z) < -700) {
+ basic.showLeds(`
+ # . . . .
+ # . . . .
+ # # # # .
+ # . . # .
+ # . . # .
+ `)
+ if (input.runningTime() - TimeStarted > 10000) {
+ for (let index = 0; index < 4; index++) {
+ basic.showLeds(`
+ . . # . .
+ . # # # .
+ # . # . #
+ . . # . .
+ . . # . .
+ `)
+ basic.pause(100)
+ basic.clearScreen()
+ basic.pause(100)
+ }
+ basic.showString("Stand Up!!")
+ }
+ } else {
+ basic.showLeds(`
+ . . # . .
+ # # # # #
+ . . # . .
+ . # . # .
+ . # . # .
+ `)
+ basic.pause(100)
+ basic.clearScreen()
+ basic.pause(100)
+ TimeStarted = input.runningTime()
+ }
+})
+```
+
+Solution link: [https://makecode.microbit.org/S25983-43564-75646-69984]()
+
+## Knowledge Check
+
+**Questions:**
+
+1. What does velocity measure?
+2. What does acceleration measure?
+3. In the **Stand for Health!** activity, what did the TimeStarted block measure?
+4. Using pseudocode, describe what these code blocks do.
+
+```blocks
+basic.forever(function () {
+ if (input.acceleration(Dimension.X) < -700) {
+ basic.showLeds(`
+ # . . . .
+ # . . . .
+ # # # # .
+ # . . # .
+ # . . # .
+ `)
+ } else {
+ basic.showLeds(`
+ . . # . .
+ # # # # #
+ . . # . .
+ . # . # .
+ . # . # .
+ `)
+ }
+})
+```
+
+**Answers:**
+
+1. Velocity measures how fast an object’s position is changing over time, in both speed and direction.
+2. Acceleration measures an object’s change in velocity.
+3. The TimeStarted block measured the number of milliseconds that had passed since the start of the program.
+4. If the micro:bit is lying flat, the screen will display a chair. If its position changes from lying flat, it will show a person standing.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/accelerometer/overview.md b/docs/test/courses/csintro/accelerometer/overview.md
new file mode 100644
index 00000000000..1f77d03a955
--- /dev/null
+++ b/docs/test/courses/csintro/accelerometer/overview.md
@@ -0,0 +1,56 @@
+# Introduction
+
+An accelerometer is a device that measures acceleration. Acceleration is itself a measure of how an object’s velocity changes.
+Velocity describes an object’s current speed in a particular direction. For example, you could describe the velocity of a car as “headed north at 50 mph”.
+
+![Acceleration Example](/test/static/courses/csintro/accelerometer/velocity.png)
+
+Acceleration is a measure of the rate at which the car’s speed and/or direction changes.
+In all these cases an acceleration occurs:
+
+* **Direction change**: The car speed continues at 50 mph, yet the car turns to travel in a northeast direction
+* **Speed change**: The car speed changes to 45 mph and the car continues heading north
+* **Speed and direction change**: The car speed changes to 65 mph and the car turns to travel in a northeast direction
+
+**Acceleration** is **a measure of the rate of these changes over time**.
+
+Note that whether the car speeds up or slows down, an acceleration occurs. Acceleration doesn't only happen when something speeds up!
+
+![High Velocity Low Acceleration Example](/test/static/courses/csintro/accelerometer/highvelocitylowaccel.png)
+![Low Velocity High Acceleration Example](/test/static/courses/csintro/accelerometer/lowvelocityhighaccel.png)
+
+You measure acceleration with the *milli-g*, which is **1/1000 of a g**. A *g* is as much acceleration as you get from Earth’s gravity.
+
+The micro:bit measures the acceleration value (*milli g-force*) in **one of three dimensions** or the combined force in **all directions (x, y, and z)**.
+
+When the micro:bit is flat on a table with the screen pointing up, the gravity force is aligned with the Z axis of the micro:bit.
+
+![Three Axes Illustration](/test/static/courses/csintro/accelerometer/lowvelocityhighaccel.png)
+
+If you tilt it up and down, the force will align with the Y axis; this is how we can detect tilting! As the force along Y grows, the micro:bit is tilting more and more vertically.
+
+### Parameters
+
+* **dimension**: The direction you are checking for acceleration or the total strength of force
+* **x**: Acceleration in the left and right direction
+* **y**: Acceleration in the forward and backward direction
+* **z**: Acceleration in the up and down direction
+* **strength**: the resulting strength of acceleration from all three dimensions (directions)
+
+The micro:bit’s accelerometer also measures how fast the micro:bit is speeding up or slowing down as it moves through space.
+
+### Output
+
+The accelerometer feature returns a number that represents the amount of acceleration.
+
+For example: When the micro:bit is lying flat on a surface with the screen pointing up:
+
+**x** is 0
+**y** is 0
+**z** is -1023
+**strength** is 1023
+
+On the back of the micro:bit, look closely in the lower left corner for the accelerometer.
+
+![Accelerometer](/test/static/courses/csintro/accelerometer/accelerometer.png)
+
diff --git a/docs/test/courses/csintro/accelerometer/project.md b/docs/test/courses/csintro/accelerometer/project.md
new file mode 100644
index 00000000000..e17a1139908
--- /dev/null
+++ b/docs/test/courses/csintro/accelerometer/project.md
@@ -0,0 +1,83 @@
+# Project: Make an Accelerometer Project
+
+For this project, you will work separately or with a friend to design a project that incorporates the micro:bit’s accelerometer capabilities.
+
+## Global Goals
+![UN Global Goals](/test/static/courses/csintro/accelerometer/global.png)
+
+In 2015, world leaders got together and came to agreement on 17 major global issues that need to be addressed. Visit the Global Goals website: [www.globalgoals.org]()
+
+- Each of the 17 goals (globalgoals.org/goals) is broken down into smaller, more specific goals.
+
+- The webpages for each of these more specific goals describe ways that citizens can take action to help reach that goal.
+
+After exploring the website, consider the following questions:
+
+- Which of the 17 goals interest you the most?
+- Which of the 17 goals do you feel most directly affect you and your community?
+- Why do you think they refer to these global issues as “goals to reach” rather than “problems to solve”? How does describing something as a “goal” differ from calling it a “problem”?
+
+## Global Goals and the micro:bit: Do Your :bit!
+
+As we have experienced already, the micro:bit is for making. From tools to games, you have made different projects and products using the micro:bit. The micro:bit can also be used to make a difference!
+
+### Do Your :bit
+![Do Your Bit Digital Challenge](/test/static/courses/csintro/accelerometer/bit.png)
+
+You can use your micro:bit to help reach one of the 17 Global Goals!
+
+Visit the “do your :bit” website ([microbit.org/projects/do-your-bit]()) to find out how other students from around the world have created projects that aim to help reach these goals.
+
+Explore the videos, resources, challenges, and projects to get ideas for a project of your own.
+
+### Project Expectations
+Follow the design thinking approach and make sure your project meets these specifications:
+
+- Uses the accelerometer to gather input about the micro:bit’s position and motion in space
+- Uses accelerometer blocks in a way that is integral to the program
+- The program compiles and runs as intended and includes meaningful comments in the code
+- Provide the written Reflection Diary entry (which we’ll talk about after you complete your project)
+
+## Project Examples
+What follows are two complete project ideas.
+Both can be found in the Coding Cards section on the home page of the MakeCode for micro:bit site: [makecode.microbit.org]()
+
+### Shake the Bottle
+![Shake the Bottle Instructions](/test/static/courses/csintro/accelerometer/shake.png)
+
+This game is inspired by a game in the Nintendo Switch game 12Switch. Players take turns holding the micro:bit, which is taped to a bottle. They give it a shake and some bubbles show on the screen. They pass it to the next player, who also gives it a shake. At some point, the bottle will pop and the player left holding the bottle loses.
+
+There are no extra components needed for this game as it just uses the built-in accelerometer to detect when the bottle is shaken.
+
+#### The code
+We start with a variable called ‘pop’ and set its value to 0 at the start. When the first player shakes the micro:bit, it checks if the value of ‘pop’ is greater than 50. If it is over 50, then it displays an asterisk (*) and the game is over. If it is not over 50, it adds a random amount to ‘pop’ between 0 and 4 and shows some bubbles on display.
+
+##### Credit: Twitter user @stulowe80
+
+### Zen
+![Shake the Bottle Instructions](/test/static/courses/csintro/accelerometer/shake.png)
+
+ZEN is a game our students made that was inspired by the Nintendo Switch game 12Switch. The aim of the game is to strike a yoga pose and hold it while keeping the micro:bit completely still. If you wobble, your screen starts to fill up. If it is full, then you are out.
+
+There are no extra components needed for this game as it just uses the built-in accelerometer on the x-axis to detect how much it wobbles rotationally left and right. You could tape the micro:bit and battery to a piece of card to make it easier to hold flat.
+
+
+#### The code
+We start by creating a variable called ‘wobble’ and setting it to 0 at the start. The value of ‘wobble’ is shown as a bar graph on the display. If ‘wobble’ becomes greater than 10, it shows an X and that player is out. If the accelerometer detects a tilt to the right or left exceeding 500 or -500, it adds 1 to your ‘wobble’ value.
+
+##### Credit: Twitter user @stulowe80
+
+## Reflection
+
+Write a short reflection of about 150–300 words, addressing the following points:
+
+* What kind of project did you do? How did you decide what to pick?
+* How does your project use the accelerometer?
+* Describe something in your project that you are proud of.
+* Describe a difficult point in the process of designing this program and explain how you resolved it.
+* What feedback did your testers give you? How did that help you improve your design?
+* How would you improve your project given more time?
+* Relating to the pair programming process (if applicable):
+* What challenges did you encounter working with a partner?
+* What benefits did you gain?
+* Publish your MakeCode program and include the link.
diff --git a/docs/test/courses/csintro/accelerometer/standards.md b/docs/test/courses/csintro/accelerometer/standards.md
new file mode 100644
index 00000000000..15a0c0e418c
--- /dev/null
+++ b/docs/test/courses/csintro/accelerometer/standards.md
@@ -0,0 +1,7 @@
+# Standards
+
+## CSTA K-12 Computer Science Standards
+
+* 1B-AP-17 Describe choices made during program development using code comments, presentations, and demonstrations
+* 2-AP-15 Seek and incorporate feedback from team members and users to refine a solution that meets user needs
+* 2-DA-08 Collect data using computational tools and transform the data to make it more useful and reliable
\ No newline at end of file
diff --git a/docs/test/courses/csintro/algorithms/activity.md b/docs/test/courses/csintro/algorithms/activity.md
index 696dc710b10..97ad1fb7263 100644
--- a/docs/test/courses/csintro/algorithms/activity.md
+++ b/docs/test/courses/csintro/algorithms/activity.md
@@ -31,7 +31,7 @@ The features highlighted here are:
2. **Simulator** shows what your program will look like when running on a @boardname@
3. **Hide** or **Show** the simulator pane
4. Program in either **Blocks** or **JavaScript**
-5. Programming **Workspace** where you will build you program
+5. Programming **Workspace** where you will build your program
6. Blocks **Toolbox**
7. **Download** your program to the @boardname@
8. Name your project and **Save** it on your computer
@@ -253,23 +253,23 @@ basic.clearScreen()
Questions:
1. What is the difference between RAM and hard drive memory?
- a. RAM is the computer’s short-term memory and the hard drive is where the computer stores its long-term memory.
- b. The hard drive is where the computer stores its short-term memory and RAM is the computer’s long-term memory.
- c. RAM is used for programming and the hard drive memory is for storage.
- d. Hard drive memory is for storing files and RAM is used for processing inputs.
+ - a. RAM is the computer’s short-term memory and the hard drive is where the computer stores its long-term memory.
+ - b. The hard drive is where the computer stores its short-term memory and RAM is the computer’s long-term memory.
+ - c. RAM is used for programming and the hard drive memory is for storage.
+ - d. Hard drive memory is for storing files and RAM is used for processing inputs.
2. What’s an algorithm?
- a. The word used to describe all computer codes
- b. Sets of instructions to a computer
- c. A type of hardware used with micro:bit
- d. The area of a MakeCode project that shows how a program looks when run on the micro:bit
+ - a. The word used to describe all computer codes
+ - b. Sets of instructions to a computer
+ - c. A type of hardware used with micro:bit
+ - d. The area of a MakeCode project that shows how a program looks when run on the micro:bit
3. What is an event in programming?
4. What is an event handler?
Answers:
-1. a. RAM is the computer’s short-term memory and the hard drive is where the computer stores its long-term memory.
-2. b. Sets of instructions to a computer
+1. The answer is a: RAM is the computer’s short-term memory and the hard drive is where the computer stores its long-term memory.
+2. The answer is b: Sets of instructions to a computer
3. An action done by the user, such as pressing a key or clicking a mouse button
4. A routine that responds to an event
diff --git a/docs/test/courses/csintro/arrays.md b/docs/test/courses/csintro/arrays.md
index 7f3393db6c2..3a3a08a0ef1 100644
--- a/docs/test/courses/csintro/arrays.md
+++ b/docs/test/courses/csintro/arrays.md
@@ -5,7 +5,7 @@
This lesson introduces the fundamental concept of storing and retrieving data in an ordered fashion using Arrays. We'll also look at JavaScript as an alternate way of creating and modifying code. We'll look at the structure of a Melody as a list of notes.
## Lesson objectives
-Students will...
+You will...
* Explain the steps they would take to sort a series of numbers.
* Recognize three common sorting algorithms.
* Practice creating Arrays.
@@ -15,7 +15,7 @@ Students will...
## Lesson structure
* Introduction: Arrays
-* Unplugged Activity: Different sorts of people
+* Unplugged Activity: Different sorts
* micro:bit Activity: Headband charades, Starry Starry Night
* Project: Make a musical instrument
* Assessment: Rubric
@@ -24,7 +24,7 @@ Students will...
## Lesson plan
1. [**Overview**: Arrays](/test/courses/csintro/arrays/overview)
-2. [**Unplugged**: Different sorts of people](/test/courses/csintro/arrays/unplugged)
+2. [**Unplugged**: Different sorts](/test/courses/csintro/arrays/unplugged)
3. [**Activity**: Headband charades](/test/courses/csintro/arrays/activity)
4. [**Project**: Musical instrument ](/test/courses/csintro/arrays/project)
diff --git a/docs/test/courses/csintro/arrays/activity.md b/docs/test/courses/csintro/arrays/activity.md
index 06561173036..aae3f0d90dc 100644
--- a/docs/test/courses/csintro/arrays/activity.md
+++ b/docs/test/courses/csintro/arrays/activity.md
@@ -1,38 +1,51 @@
-## Activity: Headband charades and starry starry night
-
-![Starry Night](/static/courses/csintro/arrays/starry-night.png)
+## Coding Activity 1: Headband charades
Create an array of words that can be used as part of a charades-type game.
-This activity is based on a very popular phone app invented by Ellen DeGeneres (https://bits.blogs.nytimes.com/2013/05/03/ellen-degeneres-iphone-game/).
+This activity is based on a very popular phone app created by the producers of the Ellen DeGeneres show. ([https://bits.blogs.nytimes.com/2013/05/03/ellen-degeneres-iphone-game/]()).
![Heads up game](/static/courses/csintro/arrays/headband-charades.png)
-* From the Arrays Toolbox drawer, drag a 'set text_list to array of' block into the 'on start' block.
-* You can use the variable name of text_list or rename it to something more meaningful like arrayWords.
+### Set the arrayWords
+
+* In Microsoft MakeCode, start a new project and name it something like **‘charades‘**. Either delete the ‘forever’ block in the coding Workspace or move it to the side, as it’s not used in the activity.
+
+* From the Arrays Toolbox drawer, drag a **‘set (text list0)’** block onto the Workspace and drop into the **‘on start’** block.
```blocks
let arrayWords = ["a", "b", "c"]
```
-Notice that the array comes with 2 string blocks. We’ll want more for our charades game.
+Notice that the array comes with three string blocks. We’ll want more for our charades game.
-* Click on the **(+)** symbol at the end of the 'array of' block.
-* Add as many values (elements) as you'd like to the array block by continuing to click on the **(+)**.
-* For now, we’ll add 3 more values for a total of 6 values.
+* Select the **(+)** symbol at the end of the **‘array of’** oval block. Add as many values (elements) as you’d like to the array block by continuing to select the **(+)**. For now, we’ll add four more values for a total of six values.
```blocks
let arrayWords = ["a", "b", "c", "", "", ""]
```
-* Fill each string with one word. Choose words that will be fun for a game of charades. Example:
+
+* Fill each string with one word. Choose words that will be fun for a game of charades. For example:
```blocks
let arrayWords = ["cat", "guitar", "flashlight", "cupcake", "tree", "frisbee"]
```
+### Code ‘on (screen up)’
+
Now, we need a way to access one word at a time from this array of words.
-* We can use the 'show string' block from the Basic Toolbox drawer, and the 'on screen up' event handler from the Input Toolbox drawer (this is a drop-down menu choice of the 'on shake' block) to tell the micro:bit to display a word when we tilt the micro:bit up.
-* For this version, we’ll display the words one at a time in the order they were first placed into the array.
-* We’ll use the index of the array to keep track of what word to display at any given time, so you'll need to create an 'index' variable.
+
+* We can use the **‘show string’** block from the Basic Toolbox drawer and the **‘on screen up’** event handler from the Input Toolbox drawer (this is a dropdown menu choice of the **‘on shake’** block) to tell the micro:bit to display a word when we tilt the micro:bit up.
+
+For this version, we’ll display the words one at a time in the order they were first placed into the array.
+
+* We’ll use the index of the array to keep track of what word to display at any given time, so you’ll need to create an **‘index’** variable using the Make a Variable button in the Variables Toolbox drawer.
+
+Now, we need a way to access one word at a time from this array of words.
+
+* We can use the **'show string'** block from the Basic Toolbox drawer, and the **'on screen up'** event handler from the Input Toolbox drawer (this is a drop-down menu choice of the **'on shake'** block) to tell the micro:bit to display a word when we tilt the micro:bit up.
+
+For this version, we’ll display the words one at a time in the order they were first placed into the array.
+
+* We’ll use the index of the array to keep track of what word to display at any given time, so you'll need to create an **'index'** variable using the Make a Variable button in the Variables Toolbox drawer.
```block
let arrayWords: string[] = []
@@ -42,12 +55,12 @@ input.onGesture(Gesture.ScreenUp, () => {
})
```
-* To start the game with the index at zero, add a 'set' variable block to the 'on' start block.
-* Next, add the following:
+* To start the game with the index at zero, add a ‘set’ variable block to the ‘on start’ block.
->* an image as a placeholder for when the program has started. Since charades is a guessing game, we made one that looks like a question mark (?),
-* a countdown to the first word using show number blocks and pause blocks
-* And show the first word in the array
+* Next, add the following:
+ * An image as a placeholder for when the program has started. Since charades is a guessing game, we made one that looks like a question mark (?)
+ * A countdown to the first word using show number blocks and pause blocks
+ * And show the first word in the array
```blocks
let index = 0
@@ -71,11 +84,11 @@ basic.showNumber(1)
basic.showString(arrayWords[index])
```
-So far we have a start to our game and a way to display the first word.
+### Code ‘on (screen down)’
-Once that word has been guessed (or passed), we need a way to advance to the next word in the array.
+So far, we have a start to our game and a way to display the first word. Once that word has been guessed (or passed), we need a way to advance to the next word in the array.
-* We can do this by changing the index of the array with the 'on screen down' event handler from the Input Toolbox drawer (this is a drop-down menu choice of the 'on shake' block) to advance to the next word when we tilt the micro:bit down.
+* We can do this by changing the index of the array with the **‘on screen down’** event handler from the Input Toolbox drawer (this is a dropdown menu choice of the **‘on shake’** block) to advance to the next word when we tilt the micro:bit down.
```block
let index = 0
@@ -85,28 +98,39 @@ input.onGesture(Gesture.ScreenDown, () => {
```
We have a limited number of elements in our array, so to avoid an error, we need to check and make sure we are not already at the end of the array before we change the index.
-
-* Under the Arrays Toolbox drawer, drag out a 'length of' block. The 'length of' block returns the number of items (elements) in an array. For our array, the length of block will return the value 6.
-* But because computer programmers start counting at zero, the index of the final (6th) element is 5.
-
+
+* Under the Arrays Toolbox drawer, drag out a **‘length of’** block. The **‘length of’** block returns the number of items (elements) in an array. For our array, the length of block will return the value 6. But because computer programmers start counting at zero, the index of the final (6th) element is 5.
+
Some pseudocode for our algorithm logic:
-* When the player places the micro:bit screen down:
->Check the current value of the index.
->> **If:** the current value of the index is less than the length of the array minus one (see **array bounds** note),
-**Then:** change the value of the index by one,
-**Else:** indicate that it is the end of the game.
-### ~hint
+When the player places the micro:bit screen down:
+
+* Check the current value of the index.
+ * **If** the current value of the index is less than the length of the array minus one (see **array bounds** note),
+ * **Then** change the value of the index by one,
+ * **Else** indicate that it is the end of the game.
-#### Array bounds
+#### Note: Array bounds
Our array has a length 6, so this will mean that as long as the current value of the index is less than 5, we will change the array by one.
-Using ‘less than the length of the array minus one’ instead of the actual numbers for our array makes this code more flexible and easier to maintain. We can easily add more elements to our array and not have to worry about changing numbers elsewhere in the code.
+Using **‘less than the length of the array minus one’** instead of the actual numbers for our array makes this code more flexible and easier to maintain. We can easily add more elements to our array and not have to worry about changing numbers elsewhere in the code.
-### ~
+#### Coding ‘on (screen down)’, continued
-We can put this all together with an 'if...then...else' block and a 'less than' comparison block from the Logic Toolbox drawer, a subtraction block from the Math Toolbox drawer, and a 'game over' block from the Game Toolbox drawer (located under the Advanced menu).
+* From the Logic Toolbox drawer, drag out an **‘if…then…else’** block onto the Workspace and drop it into the **‘on screen down’** block.
+
+* From the Logic Toolbox drawer, drag a **‘0<0’** comparison block onto the Workspace and drop it into the **‘if…then’** clause replacing the default value of **‘true’**.
+
+* From the Variables Toolbox drawer, drag an **‘index’** variable block onto the Workspace and drop it into the **first slot of the comparison block.**
+
+* We need to check that the current index value is less than the length of the array minus one (the last index value).
+ * From the Math Toolbox drawer, drag a **‘0-0’** operator block onto the Workspace and drop it into the second slot of the comparison block.
+ * From the Array Toolbox drawer, drag a ‘length of array’ block onto the Workspace and drop it into the first slot of the **‘0-0’** math operator block.
+ * In the **‘length of array’** block, use the dropdown menu to select the **‘text list’** array.
+ * In the second slot of the math operator block, type 1.
+ * Drag the **‘change index’** block from below the **‘if…then…else’** block into the ‘then’ clause.
+ * From the Game Toolbox drawer (under the Advanced Toolbox menu), scroll down to find the **‘game over’** block. Drag it onto the Workspace and drop it into the **‘else’** clause.
```blocks
let index = 0
@@ -120,9 +144,11 @@ input.onGesture(Gesture.ScreenDown, () => {
})
```
-To make our game more polished, we’ll add 2 more blocks for smoother game play.
+### Add some polish
-* In case a word is already scrolling on the screen when a player places the micro:bit screen down, we can stop this animation and clear the screen for the next word by using a 'stop animation' block from the Led More Toolbox drawer, and a 'clear screen' block from the Basic More Toolbox drawer.
+To make our game more polished, we’ll add two more blocks for smoother game play.
+
+* In case a word is already scrolling on the screen when a player places the micro:bit screen down, we can stop this animation and clear the screen for the next word by using a **'stop animation'** block from the Led More Toolbox drawer, and a **'clear screen'** block from the Basic...More Toolbox drawer.
```blocks
let index = 0
@@ -138,13 +164,17 @@ input.onGesture(Gesture.ScreenDown, () => {
})
```
-## Game Play
+## Play the game
-There are different ways you can play charades with our program. Here is one way you can play with a group of friends.
+Download the program to the micro:bits and find someone to play it with.
+There are different ways you can play charades with our program. Following is one way you can play with a group of friends.
* With the micro:bit on and held so Player A cannot see the screen, another player starts the program to see the first word.
+
* The other players act out this word charades-style for Player A to guess.
+
* When Player A guesses correctly or decides to pass on this word, a player places the micro:bit screen down.
+
* When ready for the next word, a player turns the micro:bit screen up. Play continues until all the words in the array have been used.
## Mod this!
@@ -188,21 +218,29 @@ basic.showNumber(1)
basic.showString(arrayWords[index])
```
+Solution link: [makecode.microbit.org/_RMa7s7Rj9Cwv]()
+
![Random stars](/static/courses/csintro/arrays/starry-night.gif)
## Activity: Starry starry night
In this micro:bit activity, we will create a set of random constellations on the micro:bit screen. We will use an array filled with numbers to tell us how many stars (dots) should be in each constellation.
-Review the use of the random block in the Math category.
+![Starry Night](/static/courses/csintro/arrays/starry-night.png)
+
+### Code random constellations
+
+* In MakeCode, start a new project and name it something like ‘Starry night’. Either delete the ‘forever’ block in the coding Workspace or move it to the side as it’s not used in the activity.
+
+Remember that the ‘pick random’ block in the Math Toolbox drawer will return a random value between a specified minimum and maximum value. We’ll use this to plot a single dot at a random location on the screen by choosing a random number from 0 to 4 for the x axis and a random number from 0 to 4 for the y axis.
-* Create a block that will plot a single dot at a random location on the screen by choosing a random number from 0 to 4 for the x axis and a random number from 0 to 4 for the y axis.
+* From the Led Toolbox drawer, drag a **‘plot’** block and connect it inside the ‘on start’ block. Then, from the Math Toolbox drawer, drop a **‘pick random’** block into each of the x and y values and change the range in each from 0 to 4.
```blocks
led.plot(randint(0, 4), randint(0, 4))
```
-Next, let’s create a loop that will repeat the above code five times, for a constellation with five stars.
+* Next, let’s create a loop that will repeat the above code four times to create a constellation with four stars using the **‘repeat’** block. To keep things simple, we won’t check for duplicates, so it’s possible you may end up with fewer than four visible stars. That’s okay.
```blocks
for (let index = 0; index <= 4; index++) {
@@ -210,26 +248,21 @@ for (let index = 0; index <= 4; index++) {
}
```
-Note that to keep things simple we don’t check for duplicates, so it’s possible you may end up with fewer than five visible stars. That’s okay.
+### Code the array
-Next, let’s create an array with five numbers in it. We will loop through the array and create five separate constellations, using the numbers in the array to represent the number of stars in each of the five constellations.
+Next, let’s create an array with five numbers in it. We will loop through the array and create five separate constellations using the numbers in the array to represent the number of stars in each of the five constellations.
-To create an array, you need to set the value of a variable to the array. The Arrays Toolbox has one already made for us.
+* From the Arrays Toolbox drawer, drag out the ‘set list’ block onto the Workspace and drop it into the **‘on start’** block. Then, select the (+) symbol three times to add more values to the array for a total of five. Type five random numbers from 0 to 25 in your array list since there are up to 25 LEDs on the micro:bit that could be used in your constellation.
-* From the Arrays Toolbox drawer, drag out the 'set list to' block that's attached to the ‘array of’ block containing numbers.
-* Then click on the **(+)** symbol to add more values to the block, for a total of five.
+### Code the A button
-You can drag additional numbers out of the Math category and snap them to the open slots in the Create array with block. Go ahead and change them to some random values, then attach the whole thing to the ‘on start’ event handler block.
+Let’s activate our constellations when we press a button.
-Now, when the micro:bit starts, it will create an array with those five values. Let’s create the constellations when the A button is pressed. Looking at our loop, instead of repeating 0 to 4 times, we actually want to use the value from the array to figure out how many stars to create.
+* From the Inputs Toolbox drawer, drag out an **‘on button A pressed’** block onto the Workspace.
-* Drag the ‘list get value at’ block from the Arrays Toolbox drawer and replace the 4 with that block.
+* Drag the **‘repeat’** loop from the **‘on start’** block into the **‘on button A pressed’** block. Instead of repeating 4 times, let’s use the values from the array to figure out how many stars to plot on our micro:bit.
-You should see that there are more stars printed now, although there is an extra star; if the first value in the array is 5, you will actually see 6 stars because the loop runs when index is 0.
-
-To fix this, we need to do a little math by subtracting 1 from whatever the value in the array is. You can use a Math operation block to do this.
-
-**Note:** Be sure to hit Refresh a few times on the simulator, because sometimes some stars get hidden behind other stars.
+* From the Arrays Toolbox drawer, drag a **‘list get value at’** oval block onto the Workspace and drop into the **‘repeat’** loop, replacing the default value of 4. When you type a 0, 1, 2, 3, or 4 into the **‘get value’** block, it will plot the number of stars indicated by the value held in the specified array index.
```block
let list = [5, 2, 1, 3, 4]
@@ -239,9 +272,17 @@ for (let index = 0; index < list[0] - 1; index++) {
}
```
-The above code takes the first value in the array and creates that many stars at random locations. Now, all we need to do is iterate through the entire array and do the same thing for each of the values. We will put the above code inside another loop that will run the same number of times as the length of the array (in this case, 5). You should also use a 'pause' block and a 'clear screen' block in between each constellation.
+### Loop through the array
+
+Now, all we need to do is iterate through the entire array and do the same thing for each of the values. Instead of manually typing in values 0, 1, 2, 3, or 4 into the ‘list get value at’ block, let’s use a variable and another loop to automatically increment the index each time.
+
+* From the Loops Toolbox drawer, drag another **‘for loop’** block onto the Workspace and drop into the **‘on button A pressed’** block around the existing **‘repeat’** loop.
+
+* From the Variables Toolbox drawer, drag an **‘index’** variable block onto the Workspace and drop it into the **‘list get value at’** block replacing the default 0 value.
+
+### Test in the simulator
-Finally, you might attach the code that shows the constellations to an 'on button A pressed' event handler.
+* Notice that if you try this in the simulator, all the stars will be plotted at once because the loops run too fast for us to see. So, we’ll need to add a ‘pause’ block and a ‘clear screen’ block between each constellation.
Here is the complete program.
@@ -259,16 +300,22 @@ input.onButtonPressed(Button.A, () => {
list = [5, 2, 1, 3, 4]
```
-## Traversing an array
+Solution link: [makecode.microbit.org/_fJMWJPFoK8sH]()
-Traversing an array means proceeding through the elements of the array in sequence. Note that there is a special loop in the Loops Toolbox drawer called ‘for element value of list’. This loop automatically takes each element of your array in turn and copies it into a variable called value.
+## Coding Activity 3:Traversing an array
+
+Traversing an array means proceeding through the elements of the array in sequence. You may have noticed that there is a special loop in the Loops Toolbox drawer called **‘for element value of list’.** This loop automatically loops through each element of your array in turn to “traverse” through the array.
```block
let list: number[] = []
for (let value of list) {}
```
-The following code is useful for printing out the values of the elements in your array:
+* In Microsoft MakeCode, start a new project and name it something like **‘traversing arrays’.** Either delete the ‘forever’ block in the coding Workspace or move it to the side as it’s not used in the activity.
+
+### Complete code
+
+The following code is useful for displaying the values of the elements in your array:
```blocks
let list = [5, 2, 1, 3, 4]
@@ -281,16 +328,20 @@ input.onButtonPressed(Button.B, () => {
})
```
-However, note that value holds a copy of the element in the array, so changing value doesn’t affect the original element.
+Solution link: [makecode.microbit.org/_3draPYDEjWkj]()
-If you run the code below, then print out the array again, you will see that it is unchanged.
+## Knowledge Check
-```blocks
-let list = [5, 2, 1, 3, 4]
+**Questions:**
-input.onButtonPressed(Button.A, () => {
- for (let value of list) {
- value += 1
- }
-})
-```
+1. How would you define the following terms? Array length, array sort, array index, array type
+2. How are arrays different from variables?
+3. Where do you find the Array blocks in MakeCode?
+4. To create an array in MakeCode, what do you need to assign it to?
+
+**Answers:**
+
+1. **Array length**: The total number of items in the collection; **Array sort**: How you could order items in the collection (for example: date, price, name, color, and so on). Three common types of array sorts are: bubble, selection, and insertion; **Array index**: A unique address or location in the collection, e.g., page number in an album, shelf on a bookcase, etc.; **Array type**: The type of item being stored in the collection, e.g., comics, $1 coins, Pokémon cards, numbers, strings, etc.
+2. Variables are used to store a single value; An array can be used to store many values in one place; The information contained in an array is all similar; You can think of arrays like a list of items—like a row of mailboxes or a train of container boxes.
+3. The Array blocks are found under the Advanced Toolbox menu in the Arrays category.
+4. A variable
\ No newline at end of file
diff --git a/docs/test/courses/csintro/arrays/overview.md b/docs/test/courses/csintro/arrays/overview.md
index f6d20b351ea..c08719a5323 100644
--- a/docs/test/courses/csintro/arrays/overview.md
+++ b/docs/test/courses/csintro/arrays/overview.md
@@ -1,18 +1,20 @@
# Introduction
-Any collector of coins, fossils, or baseball cards knows that at some point you need to have a way to organize everything so you can find things. For example, a rock collector might have a tray of specimens numbered like this:
+Any collector of coins, fossils, or baseball cards knows that at some point you need to have a way to organize everything so you can find things. For example, a rock collector might have a tray of specimens numbered like this:
![Rock collection is an array](/static/courses/csintro/arrays/rock-collection.png)
-Every rock in the collection needs its own storage space, and a unique address so you can find it later.
-
-As your MakeCode programs get more and more complicated, and require more variables to keep track of things, you will want to find a way to store and organize all of your data. MakeCode provides a special category for just this purpose, called an Array.
-
-* Arrays can store numbers, strings (words), or sprites. They can also store musical notes.
-* Every spot in an array can be identified by its index, which is a number that corresponds to its location in the array. The first slot in an array is index 0, just like our rock collection above.
-* The length of an array refers to the total number of items in the array, and the index of the last element in an array is always one less than its length (because the array numbering starts at zero.)
+Every rock in the collection needs its own storage space and a unique address so you can find it later.
+
+As your MakeCode programs get more and more complicated and require more variables to keep track of things, you will want to find a way to store and organize all of your data. MakeCode provides a special category for just this purpose. It’s called an **array**, which is essentially just a list, or collection, of similar things.
+
+* Arrays can store numbers, strings (words), or sprites. They can also store musical notes. But they must store values of a similar type—an array cannot contain both numbers and words.
+
+* Every spot in an array can be identified by its **index**, which is a number that corresponds to its location in the array. The first slot in an array is index 0, just like our rock collection pictured above.
+
+* The length of an array refers to the total number of items in the array, and the index of the last element in an array is always one less than its length (because the array index numbering starts at zero.) So, in the Rock Collection above, the length of the array is 5 (it can hold 5 rocks), and the index of the last element is 4.
-In MakeCode, you can create an array by assigning it to a variable. The Array blocks can be found under the Advanced Toolbox menu.
+In MakeCode, you can create an array by assigning it to a variable. The Array blocks can be found under the Advanced Toolbox menu.
![Arrays block menu](/static/courses/csintro/arrays/arrays-menu.png)
@@ -30,30 +32,34 @@ let list = [4, 2, 5, 1, 3]
input.onButtonPressed(Button.A, () => {
basic.showNumber(list[0])
})
-```
+```
+
The code above takes the first element in the array (the value at index 0) and shows it on the screen.
-
+
There are lots of other blocks in the Arrays Toolbox drawer. The next few Activities will introduce you to them.
-## Discussion
+## Arrays in everyday life
+
+Do you collect anything? What is it? Comic books, cards, coins, stamps, books, etc.
-* Ask your students if any of them collects anything. What is it? Comic books, cards, coins, stamps, books, etc.
* How big is the collection?
* How is it organized?
* Are the items sorted in any way?
* How would you go about finding a particular item in the collection?
-
-In the discussion, see if you can explore the following array vocabulary words in the context of kids’ personal collections.
-* Length: the total number of items in the collection
-* Sort: Items in the collection are ordered by a particular attribute (e.g., date, price, name)
-* Index: A unique address or location in the collection
-* Type: The type of item being stored in the collection
-
+
+See if you can identify any examples of the following array vocabulary words using the context of your personal collections:
+
+* **Length:** the total number of items in the collection
+* **Sort:** Items in the collection are ordered by a particular attribute (e.g., date, price, name)
+* **Index:** A unique address or location in the collection
+* **Type:** The type of item being stored in the collection
+
## References
-Once you start saving lots of different values in an array, you will probably want to have some way to sort those values. Many languages already implement a sorting algorithm that students can call upon as needed. However, understanding how those different sorting algorithms work is an important part of computer science, and as students go on to further study they will learn other algorithms, as well as their relative efficiency.
+Once you start saving lots of different values in an array, you'll probably want to have some way to sort those values. Many languages already implement a sorting algorithm that students can call upon as needed. However, understanding how those different sorting algorithms work is an important part of computer science, and as you go on to further study, you'll learn about other algorithms, as well as their relative efficiency.
There are some good array sorting videos:
-* Visually displays a number of different types of sorts: https://www.youtube.com/watch?v=kPRA0W1kECg
-* Bubble-sort with Hungarian folk dance: https://youtu.be/lyZQPjUT5B4
-* Insert-sort with Romanian folk dance: https://youtu.be/ROalU379l3U
\ No newline at end of file
+
+* Visually displays a number of different types of sorts: [https://youtu.be/kPRA0W1kECg]()
+* Bubble-sort with Hungarian folk dance: [https://youtu.be/lyZQPjUT5B4]()
+* Insert-sort with Romanian folk dance: [https://youtu.be/ROalU379l3U]()
\ No newline at end of file
diff --git a/docs/test/courses/csintro/arrays/project.md b/docs/test/courses/csintro/arrays/project.md
index b0f686e362c..0847329ba08 100644
--- a/docs/test/courses/csintro/arrays/project.md
+++ b/docs/test/courses/csintro/arrays/project.md
@@ -1,8 +1,8 @@
# Project: Musical instrument
-This is a project in which students are challenged to create a musical instrument that uses arrays to store sequences of notes. The array of notes can be played when an input occurs, such as one of the buttons being pressed, or if one or more of the pins is activated.
+This is a project in which you are challenged to create a musical instrument that uses arrays to store sequences of notes. The array of notes can be played when an input occurs, such as one of the buttons being pressed, or if one or more of the pins is activated.
-Ideally, the micro:bit should be mounted in some kind of housing, perhaps a guitar shape or a music box. Start by looking at different kinds of musical instruments to get a sense of what kind of shape you might want to build around your micro:bit.
+Ideally, the micro:bit should be mounted in some kind of housing, perhaps a guitar shape or a music box. Start by looking at different kinds of musical instruments to get a sense of what kind of shape you might want to build around your micro:bit.
![micro:bit guitar](/static/courses/csintro/arrays/microbit-guitar.png)
@@ -47,9 +47,10 @@ input.onButtonPressed(Button.B, () => {
```
## Using arrays with musical notes
-You can create an array of notes by attaching Music blocks to an array. Musical notes are described in words (e.g., Middle C, High C) but they are actually numbers. You can do Math operations on those numbers to change the pitch of your song.
+
+You can create an array of notes by attaching Music blocks to an array. Musical notes are described in words (e.g., Middle C, High C) but they are actually numbers. You can do Math operations on those numbers to change the pitch of your song.
-Here is an example of how to create an array with musical notes. Button A plays every note in the array. Button B plays the notes at twice the frequency (but doesn't alter the original notes.)
+Here is an example of how to create an array with musical notes. Button A plays every note in the array. Button B plays the notes at twice the frequency (but doesn't alter the original notes.)
```blocks
let list: number[] = []
@@ -69,7 +70,7 @@ input.onButtonPressed(Button.B, () => {
list = [262, 392, 330, 392, 262]
```
-Remember that a 'for element value of list' loop makes a temporary copy of the value, so even if you change a value, it will not change the original element in the array. If students want to permanently change the values in their array (transpose music to increasingly higher keys, for example) they can use a for loop like this:
+Remember that a 'for element value of list' loop makes a temporary copy of the value, so even if you change a value, it will not change the original element in the array. If you'd like to permanently change the values in your array (transpose music to increasingly higher keys, for example) you can use a for loop like this:
```blocks
let list: number[] = []
@@ -81,7 +82,7 @@ input.onButtonPressed(Button.AB, () => {
```
## Reflection
-Have students write a reflection of about 150–300 words, addressing the following points:
+Write a short reflection of about 150–300 words, addressing the following points:
* Explain how you decided on your musical instrument. What brainstorming ideas did you come up with?
* What properties does it share with a real musical instrument? What is unique?
@@ -89,38 +90,4 @@ Have students write a reflection of about 150–300 words, addressing the follow
* What was something that was surprising to you about the process of creating this program?
* Describe a difficult point in the process of designing this program, and explain how you resolved it.
* What feedback did your beta testers give you? How did that help you improve your musical instrument?
-
-## Assessment
-
-**Competency scores**: 4, 3, 2, 1
-
-### Array
-
-**4 =** Stores and iterates through each element of the array successfully.
-**3 =** Stores each element of the array successfully.
-**2 =** Array skips values or has other problems with storing and/or retrieving elements.
-**1 =** Array doesn't work at all or no array present.
-
-### Maker component
-
-**4 =** Tangible component is tightly integrated with the micro:bit and each relies heavily on the other to make the project complete.
-**3 =** Tangible component is somewhat integrated with the micro:bit but is not essential.
-**2 =** Tangible component does not add to the functionality of the program.
-**1 =** No tangible component.
-
-### micro:bit program
-
-**4 =** The program:
-`*` Uses at least one array in a fully integrated and meaningful way
-`*` Compiles and runs as intended
-`*` Meaningful comments in code
-**3 =** Uses an array in a tangential way that is peripheral to function of project and/or program lacks 1 of the required elements.
-**2 =** Array is poorly implemented and/or peripheral to function of project, and/or lacks 2 of the required elements.
-**1 =** micro:bit program lacks 3 or more of the required elements.
-
-### Collaboration reflection
-
-**4 =** Reflection piece addresses all prompts.
-**3 =** Reflection piece lacks 1 of the required elements.
-**2 =** Reflection piece lacks 2 of the required elements.
-**1 =** Reflection piece lacks 3 of the required elements.
+* Publish your MakeCode program and include the link.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/arrays/unplugged.md b/docs/test/courses/csintro/arrays/unplugged.md
index 0ee1740542c..5cdd56299a8 100644
--- a/docs/test/courses/csintro/arrays/unplugged.md
+++ b/docs/test/courses/csintro/arrays/unplugged.md
@@ -1,57 +1,78 @@
-## Unplugged: Different sorts of people
+## Unplugged: Different sorts
-In this activity, you will demonstrate different kinds of sorting methods on your own students. This is an unplugged activity, so your students will be standing at the front of the room. If you or your students are curious to see what these different sorts look like in code, we have included a MakeCode version of each algorithm in this lesson, for you to explore if you choose.
+This activity asks you to carefully consider something that comes naturally to you: sorting objects.
## Materials
-* Sheets of paper numbered 1–10, one large printed number to a page
-
-## Set Up
-
-* Have up to ten students (the Sortees) stand up at the front of the classroom. Ask another student to volunteer to be the Sorter.
-* Mix up the order of the papers and give each student a piece of paper with a number on it. They should hold the paper facing outward so their number is visible. Each of these students is like an element in an array.
-
-![Illustration of line of students representing an array](/static/courses/csintro/arrays/sorts-people.png)
+* Pieces of paper numbered 1–10
## Initial Sort
-* Ask the Sorter to place the students in order by directing them to move, one at a time, to the proper place.
-* Once the students are sorted, ask students the following:
+* Mix up the order of the numbered pieces of paper. Then, put them in a line.
+* Place the pieces in numberical order: but you must do this by moving **only one piece of paper at a time** to its proper place.
+* Once the papers have been sorted, ask yourself the following:
+ * How did you sort the papers into the right order?
+ * Did you see a pattern?
+ * What **exactly** did you do?
->* How did she sort you into the right order?
-* Did you see a pattern?
-* What did she do?
-
-Try to get students to be as precise as possible in explaining their thinking. Sometimes it helps to put the steps on the board, in an algorithm:
-* _First, she went to the first student, then put him in the right place._
-* _Then she went to each of the next students and put them in the right place._
-
-Ask for clarification when necessary: _What does it mean when you say “put them in the right place”?_
-
-_To Put Someone in the Right Place:_
+Try to be as precise as possible in explaining their thinking. Sometimes it helps to write the steps down, as an algorithm:
+
+* _First, I went to the largest number, then put it in the right place._
+* _Then I went to each of the next largest numbers and put them in the right place._
+
+Think about how you would explain this sorting process you just did to a computer, which can only understand and execute specific commands.
-_Bring the person to the front of the line and then compare that person’s number with the first person’s number. If it’s larger, then move that person to the right. K eep doing this as long as the person’s number is larger than the person on the right._
-
## Some Different Types of Sorts
-In computer science, there are certain common strategies, or algorithms, for sorting a collection of values. Try acting out each of these different sorts with your students.
+In computer science, there are certain common strategies, or algorithms, for sorting a collection of values. Try acting out each of these different sorts with the pieces of paper from earlier. We’ll demonstrate three sorting strategies:
+
+* Bubble sort
+* Selection sort
+* Insertion sort
### Bubble Sort
-Compare the first two students. If the student on the right is smaller than the student on the left, they should swap places. Then compare the second and third students. If the student on the right is smaller than the student on the left, they should swap places. When you reach the end, start over at the beginning again. Continue in this way until you make it through the entire row of students without swapping anybody.
-
-#### In pseudocode:
-1. Create a variable called counter.
-2. Set the counter to zero.
-3. Go through the entire array.
-4. If the value you are considering is greater than the value to its right:
->1. Swap them
->2. Add one to counter
-5. Repeat steps 2 through 4 as long as counter is greater than zero.
+In a bubble sort, each consecutive pair of values is compared and the larger value is swapped to the right. As multiple passes over the array occur, the larger values “bubble” up towards one end, like bubbles in a fizzy pop. Because you have to compare the same pairs of numbers repeatedly, bubble sort is not terribly efficient—although it does have the advantage that if you make a complete pass comparing every consecutive pair and no swaps occur, you can preemptively declare the array sorted and your task is done.
+
+### Selection Sort
+In a selection sort, multiple passes over the array are made to determine the smallest number on that pass. That smallest number is then swapped with the number on the end, and the next pass over the remaining unsorted numbers occurs. Because there is no way to tell if you have finished early, selection sort will always take the same number of passes as the number of elements in the array to complete. So, it is even slower than bubble sort, on average.
+
+### Insertion Sort
+Imagine that we’re sorting a pile of papers alphabetically. We might place the top paper to the side, starting a new pile, and consider it sorted. Then, we would take the next paper and place it either before or after the previous paper in the sorted pile depending on whether that paper comes before or after it in the alphabet. Every subsequent paper that comes off the unsorted pile we would place right where it belongs in the sorted pile. That way, we only touch each paper once, and after one pass through the array, we are done. At first this seems more efficient than bubble sort and selection sort, but as the sorted pile grows larger, the number of comparisons we have to make to place each paper in the right place also increases. So, insertion sort actually isn’t any more efficient than the other two methods, although it is probably closest to the way a human being would sort an array of elements.
+### Bubble sort algorithm
+
+Follow these steps to demonstrate a bubble sort:
+
+1. Compare the first two papers. If the piece of paper on the right has a smaller number than the paper on the left, they should swap places.
+
+2. Next, compare the second and third papers. If the paper on the right has a smaller number than the paper on the left, they should swap places.
+
+3. When you reach the end, start at the beginning again.
+
+4. Continue in this way until you make it through the entire row of numbers without swapping any of them.
+
![Bubble Sort Animation](/static/courses/csintro/arrays/bubble-sort.gif)
#### In MakeCode:
-**Note:** Press B to display the array visually. The length of each vertical bar represents each number in the array, from left to right. Press A to sort the array using Bubble Sort. Press A + B to generate new random numbers for the array.
+To code a bubble sort, the pseudocode could look like this:
+
+1. Create a variable called **counter**.
+
+2. Set the counter to **0**.
+
+3. Go through the entire array.
+
+4. If the value you are considering is greater than the value to its right, swap them and add one to counter.
+
+5. Repeat steps 2 through 4 as long as counter is greater than zero.
+
+Following is an example in MakeCode:
+
+* Press B to display the array visually. The length of each vertical bar represents each number in the array from left to right.
+
+* Press A to sort the array using Bubble Sort.
+
+* Press A + B to generate new random numbers for the array.
```blocks
let temp = 0
@@ -108,19 +129,36 @@ list = [4, 2, 5, 1, 3]
counter = 1
```
-### Selection Sort
-Take the first student on the left and consider that person’s number the smallest number you have found so far. If the next person in line has a number that is smaller than that number, then make that person’s number your new smallest number and continue in this way until you reach the end of the line of students. Then, move the person with the smallest number all the way to the left. Then start over from the second person in line. Keep going, finding the smallest number each time, and making that person the rightmost person in the sorted line of students.
-
-#### In pseudocode:
-1. Find the smallest unsorted value in the array.
-2. Swap that value with the first unsorted value in the array.
-3. Repeat steps 1 and 2 while the number of unsorted items is greater than zero.
+### Selection Sort algorithm
+Follow these steps to demonstrate a selection sort:
+
+1. Take the first paper on the left and consider that paper's number the smallest number you have found so far.
+
+2. If the next paper in line has a number that is smaller than that number, make that paper's number your new smallest number and continue in this way until you reach the end of the line of papers.
+
+3. Move the paper with the smallest number all the way to the left.
+
+4. Start over from the second paper in line.
+
+5. Keep going, finding the smallest number each time, and making that paper the rightmost paper in the sorted line of papers.
![Selection Sort Animation](/static/courses/csintro/arrays/selection-sort.gif)
#### In MakeCode:
-**Note:** The inner loop gets smaller as the sorting algorithm runs because the number of unsorted items decreases as you go. The index that the inner loop starts at needs to change as the number of sorted items increases, which is why we have to use a separate counter (item) and compute j every time through the inner loop.
+To code a selection sort, the pseudocode could look like this:
+
+1. Find the smallest unsorted value in the array.
+
+2. Swap that value with the first unsorted value in the array.
+
+3. Repeat steps a and b while the number of unsorted items is greater than zero.
+
+Following is an example in MakeCode:
+
+* The inner loop gets smaller as the sorting algorithm runs because the number of unsorted items decreases as you go.
+
+* The index that the inner loop starts at needs to change as the number of sorted items increases, which is why we have to use a separate counter (item) and compute j every time through the inner loop
```blocks
let temp = 0
@@ -185,16 +223,25 @@ min = 1
```
### Insertion Sort
-Take the first student on the left and consider that person sorted. Next, take the next student and compare him to the first student in the sorted section. If he is greater than the first student, then place him to the right of the student in the sorted section. Otherwise, place him to the left of the student in the sorted section. Continue down the line, considering each student in turn and then moving from left to right along the students in the sorted section until you find the proper place for each student to go, shifting the other students to the right to make room.
-
-#### In pseudocode:
+Follow these steps to demonstrate an insertion sort:
+
+1. Take the first paper on the left and consider that paper sorted.
+
+2. Take the next paper and compare its number to the first paper in the sorted section. If its number is greater than the first paper's, then place it to the right of the paper in the sorted section. Otherwise, place it to the left of the paper in the sorted section.
+
+3. Continue down the line, considering each paper in turn and then moving from left to right along the papers in the sorted section until you find the proper place for each paper to go, shifting the other papers to the right to make room.
+
+#### In MakeCode:
+
+To code an insertion sort, the pseudocode could look like this:
+
1. For each element in the unsorted section of the list, compare it against each element in the sorted section of the list until you find its proper place.
+
2. Shift the other elements in the sorted list to the right to make room.
-3. Insert the element into its proper place in the sorted list.
-![Insertion Sort Animation](/static/courses/csintro/arrays/insertion-sort.gif)
+3. Insert the element into its proper place in the sorted list.
-#### In MakeCode:
+Following is an example in MakeCode:
```blocks
let j = 0
diff --git a/docs/test/courses/csintro/binary.md b/docs/test/courses/csintro/binary.md
index bbe1f4091f7..f111f8e626f 100644
--- a/docs/test/courses/csintro/binary.md
+++ b/docs/test/courses/csintro/binary.md
@@ -2,11 +2,12 @@
![Binary numbers shown on a monitor](/static/courses/csintro/binary/binary-crt.png)
-This lesson presents the concept of binary digits and base-2 notation. Students will learn how data is stored digitally and how it can be read and accessed.
+This lesson presents the concept of binary digits and base-2 notation. You will learn how data is stored digitally and how it can be read and accessed.
## Lesson objectives
-Students will...
+You will...
+
* Understand what bits and bytes are and how they relate to computers and the way information is processed and stored.
* Learn to count in Base-2 (binary) and translate numbers from Base-10 (decimal) to binary and decimal.
* Apply the above knowledge and skills to create a unique program that uses binary counting as an integral part of the program.
@@ -14,7 +15,6 @@ Students will...
## Lesson structure
* Introduction: Bits and Bytes
-* Unplugged Activity: Binary Vending Machine
* micro:bit Activity: Binary Transmogrifier
* Project: Make a Binary Cash Register
* Assessment: Rubric
@@ -23,9 +23,8 @@ Students will...
## Lesson plan
1. [**Overview**: Bits, bytes, binary](/test/courses/csintro/binary/overview)
-2. [**Unplugged**: Binary vending machine](/test/courses/csintro/binary/unplugged)
-3. [**Activity**: Binary transmogrifier](/test/courses/csintro/binary/activity)
-4. [**Project**: Make binary a cash register](/test/courses/csintro/binary/project)
+2. [**Activity**: Binary transmogrifier](/test/courses/csintro/binary/activity)
+3. [**Project**: Make binary a cash register](/test/courses/csintro/binary/project)
## Flipgrid
diff --git a/docs/test/courses/csintro/binary/activity.md b/docs/test/courses/csintro/binary/activity.md
index f9eea274eab..6221165e7d7 100644
--- a/docs/test/courses/csintro/binary/activity.md
+++ b/docs/test/courses/csintro/binary/activity.md
@@ -1,28 +1,32 @@
# Activity: Binary transmogrifier
-Guide the students through building a binary transmogrifier (converter) that converts between binary (base-2) and decimal (base-10) numbers. Let them figure out a pattern that will allow them to do the conversion on the fly.
+In this activity, you'll build a binary transmogrifier (converter) that converts between binary (base-2) and decimal (base-10) numbers.
![Transmogrifier cartoon](/static/courses/csintro/binary/transmogrifier.png)
Calvin & Hobbes
-Tell the students that they will be building a binary transmogrifier with the micro:bit.
The user will be able to use the buttons to enter binary 0s and 1s and will be able to press A+B at any time to display the decimal equivalent of the number that has been entered.
## Create the Variables
-Students will need to create a number variable to hold the running decimal total.
-They should also create a string variable to hold the current binary number.
-* From the Variables menu, make and name these two variables: decimal, binary.
+First, you'll need to create a number variable to hold the running decimal total.
+Then, you should create a string variable to hold the current binary number.
+
+* In Microsoft MakeCode, start a new project and name it something like **binary calculator** or **binary converter.** Either delete the **‘forever’** block in the coding Workspace or move it to the side as it’s not used in the activity. Then from the **Variables** menu, select the **Make a Variable** button to make two variables. Name one: **decimal** and the other: **binary**
>![Make a variable](/static/courses/csintro/binary/make-a-variable.png)
>![Name a variable](/static/courses/csintro/binary/name-a-variable.png)
## Initialize the Variables
-When the program starts up, you should initialize your variables to starting values.
-* `decimal` = `0`
-* `binary` = `""` (empty string)
-This also tells the micro:bit what type of variable it is. Use the empty string value found in the **Text** toolbox drawer, under the **Advanced** menu.
+
+When the program starts up, you should initialize your variables to starting values.
+
+* From the Variable Toolbox drawer, drag two ‘set’ blocks to the coding Workspace and drop them inside the ‘on start’ block. Depending on which variable you made first, the ‘set’ block will default to one of the new variables. Use the dropdown menu to set one block to binary and the other to decimal.
+
+Now, we can give these variables some starting values: For the decimal variable, keep the default parameter of 0. For the binary variable, we want an empty string to hold the binary text value.
+
+* Select the Advanced tab in the Toolbox to open up more Toolbox categories. Then select the Text Toolbox drawer to find the empty string oval block. Drag one onto the Workspace and drop it into the **‘set binary to’** block replacing the 0.
![Select text on block menu](/static/courses/csintro/binary/select-text-blocks.png)
@@ -33,13 +37,15 @@ let decimal = 0
By setting the binary variable to an initial value of “ “ you tell the micro:bit that it is a string variable: a literal string of characters. This is important because you will be adding to this string character by character.
-## Transmogrify Me!
-We are ready to start entering numbers. Remember that binary numbers are calculated based on the number of place values (“bits”) and as you enter 1s and 0s, the value changes. One way to calculate the decimal value is to wait until the user presses A+B, and then calculate the entire number based on the value of the string.
+## Ready, set, calculate!
+
+We are ready to start entering numbers. Remember that binary numbers are calculated based on the number of place values (“bits”), and as you enter 1s and 0s, the value changes. One way to calculate the decimal value is to wait until the user presses A+B, and then calculate the entire number based on the value of the string.
However, a much simpler method is to calculate the decimal number “on the fly”, which is to say, every time the user presses a 1 or a 0, calculate the current decimal value of that string so you only have to deal with one 0 or 1 at a time.
-## What’s the Pattern?
-This is a table of the first fourteen binary numbers and their decimal equivalents. Your goal is to use this table to figure out how to calculate a new correct decimal value based on whether a user enters a 0, or a 1 as the next number in the string.
+## What’s the pattern?
+
+This is a table of the first fifteen binary numbers and their decimal equivalents. Your goal is to use this table to figure out how to calculate a new correct decimal value based on whether a user enters a 0, or a 1, as the next number in the string
```
Binary Decimal Binary Decimal
@@ -54,63 +60,55 @@ Binary Decimal Binary Decimal
```
For example, imagine you are the micro:bit. If the first number the human enters is a 1, you automatically know the new decimal value is a 1. If the second number that is entered is a 0, then your decimal value goes from 1 to 2. However, if the second number is also a 1, then your new decimal value goes from 1 to 3.
-At that point, you either have a 10, or a 11 in your binary string. Let’s take 10 as an example. The decimal value of binary 10 is 2. If the third number entered is a 0, then your new decimal value goes from 2 to 4. If the third number entered is a 1, then your new decimal value goes from 2 to 5.
+At that point, you either have a 10 or an 11 in your binary string. Let’s take 10 as an example. The decimal value of binary 10 is 2. If the third number entered is a 0, then your new decimal value goes from 2 to 4. If the third number entered is a 1, then your new decimal value goes from 2 to 5.
-If, on the other hand, you have 11 in your binary string, then your decimal value is 3. If the third number entered is a 0, then your new decimal value goes from 3 to 6. If the third number entered is a 1, then your new decimal value goes from 3 to 7.
+If, on the other hand, you have 11 in your binary string, then your decimal value is 3. If the third number entered is a 0, then your new decimal value goes from 3 to 6. If the third number entered is a 1, then your new decimal value goes from 3 to 7.
See if you can spot a pattern that will help you figure out, for any given decimal value, what the new decimal value should be if the user enters a 0, or if the user enters a 1.
![Binary number patterns](/static/courses/csintro/binary/binary-patterns.png)
## Pseudocode
-Recall from our Algorithms lesson that it is a good idea to write out your algorithm in plain English, before you start coding in MakeCode. This is called pseudocode. The Input for this program will be the buttons. Try to write out what should happen when each of the buttons is pressed.
-
-Here is one possible solution. Your own pseudocode might be different and that’s okay.
+The input for this program will be the buttons. Try to write out what should happen when each of the buttons is pressed. Here is one possible solution. Your own pseudocode might be different and that’s okay. Remember: there can always be different approaches in coding.
When Button A is pressed:
-1. Add a “1” to the end of the binary string.
-2. Show the current value of the binary string.
-3. Update the decimal value with the total.
+
+* Add a “1” to the end of the binary string.
+* Show the current value of the binary string.
+* Update the decimal value with the total.
When Button B is pressed:
-1. Add a “0” to the end of the binary string.
-2. Show the current value of the binary string.
-3. Update the decimal value with the total.
+
+* Add a “0” to the end of the binary string.
+* Show the current value of the binary string.
+* Update the decimal value with the total.
When Buttons A+B are pressed:
-1. Show the current value of the decimal string.
-## Coding Steps
-* From the Input Toolbox drawer, drag 3 of the ‘on button A pressed’ event handlers to your coding workspace
-* Leave one block with button 'A’. Use the drop-down menus in the other 2 blocks to choose button ‘B’, and button ‘A+B’
+* Show the current value of the decimal string.
-```block
-input.onButtonPressed(Button.A, () => {
-
-})
-input.onButtonPressed(Button.B, () => {
-
-})
-input.onButtonPressed(Button.AB, () => {
-
-})
-```
+## Code button A
+
+* From the Input Toolbox drawer, drag three of the **‘on button A pressed’** event handlers to your coding Workspace. Leave one block with button ‘A’. Use the dropdown menus in the other two blocks to choose button ‘B’, and button ‘A+B’.
-### ~ hint
+Let’s work on what to do when button A is pressed. Button A represents a binary “1”. Our first task is to join a “1” to the existing string variable called **binary**.
-Buttons are on all kinds of electronic devices that we use. Did ever wonder how they actually work to signal an input event?
+* From the Variables Toolbox drawer, drag a **‘set (variable)’** block onto the Workspace, and drop it into the ‘on button A pressed’ block. Then use the dropdown menu to select the ‘binary’ variable.
-https://www.youtube.com/watch?v=t_Qujjd_38o
+* From the Text Toolbox drawer (under the Advanced menu), drag the **‘join’** block to your coding Workspace and drop it into the **‘set binary to’** block replacing the default 0 value.
-### ~
+* From the Variables Toolbox drawer, drag a **‘binary’** variable value block onto the Workspace and drop it into the first slot of the **‘join’** block, replacing the default “Hello”
+
+* In the second slot of the **‘join’** block, replace the default value of “World” to **1**. This will append a “1” to whatever value is currently being held in the binary variable.
+
+## Code button A display
+
+Now, let’s display this value on the micro:bit.
+
+* From the Basic Toolbox drawer, drag a ‘show string’ block onto the Workspace, and drop it after the ‘set binary’ block in the ‘on button A pressed’ block.
+
+* From the Variables Toolbox drawer, drag a ‘binary’ variable value block onto the Workspace and drop it into the ‘show string’ block replacing the default value of “Hello!”
-Let’s work on what to do when button A is pressed.
-* Button A represents a binary “1”. Our first task is to join a “1” to the existing string variable called binary.
-* From the Text Toolbox drawer (under the Advanced menu), drag the 'join' block to your programming workspace
-* Next, use the 'set' variable block to assign the value of the 'binary' variable to the 'join' block
-* Join the 'binary' variable and “1” by entering them into the appropriate slots in the 'join' block
-* And show the binary value on the screen so that when users press a button they can see the entire binary string
-
```block
let binary = ""
input.onButtonPressed(Button.A, () => {
@@ -119,12 +117,25 @@ input.onButtonPressed(Button.A, () => {
})
```
-* Finally, you will need to update the current decimal value with the value of the entire binary string. This is pretty straightforward if you have been keeping track of the decimal value every time someone presses a button. The pattern is as follows: _(spoiler alert!)_
+Finally, you will need to update the current decimal value with the value of the entire binary string. The pattern pseudocode is as follows:
+
+* Whenever someone enters a 0, the new decimal value is twice the previous value.
->* Whenever someone enters a 0, the new decimal value is twice the previous value.
->* If someone enters a 1, the new decimal value is twice the previous value, plus 1.
+* If someone enters a 1, the new decimal value is twice the previous value, plus 1.
-* For Button A, you will need to use the multiplication Math block and your binary variable block to create the proper formula. You will need to put that formula inside another Math addition block in order to add one to the result.
+For button A (when a user enters a 1), you will need to use the **‘multiplication’** Math block and your binary variable block to create the proper formula. You will need to put that formula inside another Math ‘addition’ block in order to add one to the result.
+
+* From the Variables Toolbox drawer, drag a **‘set (variable)’** block onto the coding Workspace, and drop it into your **‘on button A pressed’** block after the **‘show string’** block. Then, use the dropdown menu to select the **‘decimal’** variable.
+
+* From the Math Toolbox drawer, drag out two blocks to the Workspace: the **multiplication** block and the **addition** block. Don’t place these yet; just keep them on the Workspace (they should be greyed out). We’ll be nesting the two math expressions.
+
+**Note:** When working the nested expressions—Math or Logic blocks placed inside each other—it’s easier to do the block manipulation on the coding Workspace separately first before attaching to other blocks in your program.
+
+* From the Variables Toolbox drawer, drag a **‘decimal’** variable value block onto the Workspace and drop it into the first slot of the multiplication math block replacing the default value of 0. Type a **2** into the second slot of the multiplication math block. Now, drag the multiplication math block into the first slot of the addition math block, replacing the default value of 0.
+
+* Type a **1** into the second slot of the addition math block. Now, drag the whole Math expression into the **‘set (decimal) to 0’** block to replace the 0 default value.
+
+* Test this code in the Simulator to confirm it’s working as intended.
```block
let binary = ""
@@ -136,10 +147,22 @@ input.onButtonPressed(Button.A, () => {
})
```
-* Your Button B algorithm is similar, although you will be joining a “0” to the binary variable and you are just multiplying the decimal variable by 2.
-* Your Button A+B algorithm just uses a Show block to show the value of the decimal variable.
+## Code button B
+
+Your button B algorithm is similar, although you will be joining a “0” to the binary variable, and you are just multiplying the decimal variable by 2.
+
+* An alternative to coding the blocks from the Toolbox drawers is to duplicate the entire **‘on button A pressed’** set of blocks, then:
+
+ * In the **‘join binary 1’** block, change the 1 to **0**.
+ * In the **‘set decimal to’** block, select the ‘decimal x 2’ oval and pull it out of the blocks to “un-nest” it (it will be grayed out). Delete the ‘0 + 1’ oval in the ‘set decimal to’ block and replace the resulting 0 value with the grayed out **‘decimal x 2’** oval block.
+
+* Again, test this new code in the Simulator to make sure it’s working as intended.
+
+## Code button A+B
+
+Your button A+B algorithm just uses a **‘show’** block to show the current value of the decimal variable.
-Here is the completed program.
+* From the Input Toolbox drawer, drag an **‘on button A pressed’** block to the coding Workspace and use the dropdown menu to select **‘A+B’**. Then, from the Basic Toolbox drawer, drag a **‘show number’** block and drop it into the **‘on button A+B pressed’** block. Then, duplicate a **‘decimal’** variable value from one of the other blocks and replace the 0 of the **‘show number’** block.
```blocks
let binary = ""
@@ -161,10 +184,41 @@ decimal = 0
binary = ""
```
+Solution link: [makecode.microbit.org/_2CmVy1CcJLay]()
+
### Try it out!
-Have someone else try your program out. Then think about how the program might be improved.
+
+Once you’ve tested all the code in the Simulator, download it to the micro:bit. Have someone else try your program out. Then, think about how the program might be improved.
+
+### Mod this!
+
Here are some additional modifications you might try:
+
* Add a way to clear the binary and decimal values so you can start over.
* Add a way to erase the previous value.
* Create a decimal-binary converter that allows you enter a decimal value and see the binary equivalent when you press A+B.
+* Create a physical housing or case for your binary calculator!
+
+### All about buttons
+
+Buttons are on all kinds of electronic devices that we use. Have you ever wondered how they actually work to signal an input event?
+
+[https://www.youtube.com/watch?v=iCHAIeoSpI4](https://www.youtube.com/watch?v=iCHAIeoSpI4)
+
+## Knowledge Check
+
+**Questions:**
+
+1. What is the definition of a bit?
+2. What is the definition of byte?
+3. What is 37 in binary?
+4. What is 110110 in decimal?
+5. Put the following in order from smallest to largest measurement: Megabyte, Kilobyte, Terabyte, Gigabyte
+
+**Answers:**
+1. A bit is a binary digit with two possible values: 0 or 1.
+2. A byte is a sequence of binary digits made up of eight bits. It has 256 possible values from 00000000 through 11111111.
+3. 100101
+4. 54
+5. Kilobyte, Megabyte, Gigabyte, Terabyte
\ No newline at end of file
diff --git a/docs/test/courses/csintro/binary/overview.md b/docs/test/courses/csintro/binary/overview.md
index fef314e837e..cb2cd01763f 100644
--- a/docs/test/courses/csintro/binary/overview.md
+++ b/docs/test/courses/csintro/binary/overview.md
@@ -1,18 +1,24 @@
# Introduction
-Most everyone who uses a computer has heard the terms, kilobyte (kB), Megabyte (MB), Gigabyte (GB) and even Terabyte (TB), usually when referring to the size of computer files and hard drives as well as download speeds. Bandwidth or connection rates are measured in bits/second. But what is a bit and what is a byte and what do they have to do with computers?
+Most everyone who uses a computer has heard the terms, Kilobyte (KB), Megabyte (MB), Gigabyte (GB) and even Terabyte (TB), usually when referring to the size of computer files and hard drives as well as download speeds. Bandwidth or connection rates are measured in bits/second. But what is a bit and what is a byte, and what do they have to do with computers?
-Picture a basic room light. The light is either on or it is off. You control the current state of the light by flipping a switch that has only two settings, down (light off) and up (light on). The earliest computers used a series of mechanical switches to control the flow of electricity through their circuits, turning each one on or off. The on/off states of the circuits was used to represent and even store information. The smallest unit of information, representing the state of one switch, is known as a bit.
+Picture a basic room light. The light is either on or off. You control the current state of the light by flipping a switch that has only two settings, on or off. The earliest computers used a series of mechanical switches to control the flow of electricity through their circuits, turning each one on or off. The on/off states of the circuits were used to represent and even store information. The smallest unit of information, representing the state of one switch, is known as a **bit**.
-A bit is a binary digit and has only two possible values, zero or one. The value of the bit represents the current state of a single switch. If the switch is off, then the bit has the value zero. If the switch is on, then the bit has the value one.
+A bit is a **binary** digit and has only two possible values, zero or one. The value of the bit represents the current state of a single switch. If the switch is off, then the bit has the value zero. If the switch is on, then the bit has the value one.
-A bit can only represent two different values, zero or one. To represent larger pieces of information, bits are strung together in sequences of 8 called bytes.
+A bit can only represent two different values, 0 or 1. To represent larger pieces of information, bits are strung together in sequences of eight called **bytes**.
-A byte is a sequence of binary digits made up of 8 bits.
+A byte is a sequence of binary digits made up of eight bits.
-A byte can represent any value from 00000000 through 11111111, for a total of 256 different possible values. Each digit in a byte can be thought of as representing an individual switch that is either off (zero) or on (one).
+A byte can represent any value from 00000000 through 11111111, for a total of 256 different possible values. Each digit in a byte can be thought of as representing an individual switch that is either off (0 or on (1).
-Modern computers rely on transistors, which pack millions of tiny switches into a chip smaller than your thumb, but information is still represented in essentially the same way: as a series of ones and zeros. By using binary, computers can represent information simply and efficiently using a system that is very effectively modeled in digital circuitry.
+Modern computers rely on transistors, which pack millions of tiny switches into a chip smaller than your thumb, but information is still represented in essentially the same way: as a series of 1s and 0s. By using **binary**, computers can represent information simply and efficiently using a system that is very effectively modeled in digital circuitry.
+
+In coding:
+
+* The 1s and 0s of bits and bytes can be used to represent letters, numbers, and even different keys on a computer keyboard.
+
+* A bit can be used to hold a Boolean (true/false) value. A value of 0 represents “false” and a value of 1 represents “true.”
## Review
@@ -26,5 +32,4 @@ Modern computers rely on transistors, which pack millions of tiny switches into
## Notes
* The ones and zeros of bits and bytes can be used to represent letters, numbers, and even different keys on a computer keyboard.
-* A bit can be used to hold a Boolean (true/false) value. A value of zero represents ‘false’ and a value of one represents ‘true’.
-
+* A bit can be used to hold a Boolean (true/false) value. A value of zero represents ‘false’ and a value of one represents ‘true’.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/binary/project.md b/docs/test/courses/csintro/binary/project.md
index 47318cd244f..89793e82551 100644
--- a/docs/test/courses/csintro/binary/project.md
+++ b/docs/test/courses/csintro/binary/project.md
@@ -1,8 +1,6 @@
# Project: Make a binary cash register
-The unplugged activity uses a vending machine as a model for creating different combinations of binary place values. We found that for n coins, there is one and only one way to make every number between 0 and 2^_n-1_.
-
-For this project, students should invent a paper and cardboard version of the binary counter, then program it to display the decimal value of those numbers.
+For this project, you'll be making a binary cash register out of paper, cardboard, and of course the micro:bit. This will involve programming your cash register to display the decimal value of various binary numbers.
Materials
* Cardboard or heavy paper
@@ -15,77 +13,57 @@ Materials
![micro:bit cash register](/static/courses/csintro/binary/microbit-cash-register.png)
Binary micro:bit Cash Register
-## Tips
-This is one possible design for a binary cash register. We used coins and copper tape on a piece of cardboard. Normally, the coins are flipped up (“off” or 0) and to indicate “on” or 1, the coin is flipped so it lays flat across both pieces of copper tape, completing the circuit so the micro:bit can detect that that pin has been activated, and calculates and displays the decimal value of the binary number that is indicated by the coins.
+## Project Example
+
+![Binary cash register project](/static/courses/csintro/binary/binary-cash-register.jpg)
+An implementation of the Binary Cash Register
+
+This is one possible design for a binary cash register. It uses coins and copper tape on a piece of cardboard. Normally, to indicate “off” or 0, the coins are flipped up. And to indicate “on” or 1, the coin is flipped so it lays flat across both pieces of copper tape, completing the circuit so the micro:bit can detect that that pin has been activated, and calculates and displays the decimal value of the binary number that is indicated by the coins.
+
+Copper tape is a thin, flexible strip of copper with an adhesive back. Usually, copper tape can conduct electricity even through the sticky side, but if you are sticking one piece of copper tape to another, be sure to go over the connection with your fingernail, pressing it down firmly.
-Copper tape is a thin, flexible strip of copper with an adhesive back. You can sometimes find copper tape at the hardware, sold as slug tape, to keep slugs out of your garden. Usually, copper tape can conduct electricity even through the sticky side but if you are sticking one piece of copper tape to another, be sure to go over the connection with your fingernail, pressing it down firmly.
+Because the micro:bit only has three pins/rings, this binary register is limited to three place values. You might use variables to represent each of the three place values, or you can simply keep a running total by adding the appropriate amount when each of the three pins is pressed.
-Because the micro:bit only has three pins, this binary register is limited to three place values. Students might use variables to represent each of the three place values, or they can simply keep a running total by adding the appropriate amount when each of the three pins is pressed.
+You will need to connect the ground (GND) pin using copper tape to the other side of the circuit – using the coin to connect them.
You can stick the micro:bit into place using some sticky tape, or you can create an actual holder. The copper tape connections are delicate though, so be careful when plugging and unplugging the power cable from the board.
-![Binary cash register project](/static/courses/csintro/binary/binary-cash-register.jpg)
-An implementation of the Binary Cash Register
+Project mod options
+
+## Mods for the binary cash register
+
+* Write some code that will display the number in binary when you press the A button.
-## Extra mods
-* Write some code that will display the number in binary when you press the A button.
* Think of a way to create more place values, perhaps by using a second micro:bit and a Radio connection.
-## Optional project: Build a binary wristwatch
-* Write a program that will display the correct time (once set) on the micro:bit.
-* The 3-4 numbers displayed will be in binary (not decimal).
-* To make the strap of the wristwatch, put 2 pieces of duct tape back-to-back, and use velcro tabs as the fasteners
+## Optional additional project: Build a binary wristwatch
+
+Here's another idea for a project that deals with binary:
+
+* Write a program that will display the correct time (once set) on the micro:bit.
+
+* The three to four numbers displayed will be in binary (not decimal).
![Binary wrist watch project](/static/courses/csintro/binary/binary-wrist-watch.jpg)
-To make the strap of the wristwatch, you can put two pieces of duct tape back-to-back, and use Velcro tabs as the fasteners.
+* To make the strap of the wristwatch, put two pieces of duct tape back-to-back, and use Velcro tabs as the fasteners.
![Holder](/static/courses/csintro/binary/microbit-holder.jpg)
+
This is a holder that allows the micro:bit to be worn on the wrist.
![Wooden structure to hold the micro:bit on the wrist](/static/courses/csintro/conditionals/microbit-holder.jpg)
+
This design supports the micro:bit in a rigid cradle and allows more delicate connections to the pins.
## Reflection
-Have students write a reflection of about 150–300 words, addressing the following points:
+Write a short reflection of about 150–300 words, addressing the following points:
* Describe what the physical component of yur micro:bit project was (e.g., an armband, a cardboard mount, a holder, etc.)
* How well did your prototype work? What were you happy with? What would you change?
* What was something that was surprising to you about the process of creating this project?
* Describe one way in which your project differed from the example that was given. How would you recognize it as your own?
-
-## Assessment
-
-**Competency scores**: 4, 3, 2, 1
-
-### Binary display
-
-**4 =** All binary numerals display correctly.
-**3 =** At least 2 binary numerals display correctly.
-**2 =** At least 1 binary numeral displays.
-**1 =** No binary numerals display correctly.
-
-### micro:bit program
-
-**4 =** micro:bit program:
-`*` Uses binary in a way that is integral to the program
-`*` Uses mathematical operations to convert decimal-binary
-`*` Compiles and runs as intended
-`*` Meaningful comments in code
-**3 =** micro:bit program lacks 1 of the required elements.
-**2 =** micro:bit program lacks 2 of the required elements.
-**1 =** micro:bit program lacks 3 or more of the required elements.
-
-### Reflection
-
-**4 =** Reflection piece includes addresses all prompts.
-**3 =** Reflection piece lacks 1 of the required elements.
-**2 =** Reflection piece lacks 2 of the required elements.
-**1 =** Reflection piece lacks 3 of the required elements.
-
-## Additional questions to ponder
-* How could you use a row of flashlights to represent a number to someone else far away?
-* How might you use those flashlights to send a message?
+* Publish your MakeCode program and include the link.
## Resources
diff --git a/docs/test/courses/csintro/binary/unplugged.md b/docs/test/courses/csintro/binary/unplugged.md
index 5e9c6c4495d..5c4deebd98c 100644
--- a/docs/test/courses/csintro/binary/unplugged.md
+++ b/docs/test/courses/csintro/binary/unplugged.md
@@ -135,6 +135,4 @@ Next, have the students use the above method in reverse to translate numbers fro
**Examples:**
>0 1 0 1 0 (_10_ )
-1 1 0 1 1 0 (_54_ )
-
-
+1 1 0 1 1 0 (_54_ )
\ No newline at end of file
diff --git a/docs/test/courses/csintro/booleans.md b/docs/test/courses/csintro/booleans.md
index 926da8e4e26..49d7ff28988 100644
--- a/docs/test/courses/csintro/booleans.md
+++ b/docs/test/courses/csintro/booleans.md
@@ -2,15 +2,16 @@
![micro:bit Combo Box](/static/courses/csintro/booleans/cover.jpeg)
-This lesson introduces the use of the boolean data type to control the flow of a program, keep track of state, and to include or exclude certain conditions.
+This unit introduces the use of the **Boolean** data type to control the flow of a program, keep track of the status of the program, and to include or exclude certain conditions. In an unplugged activity, you will write pseudocode to simulate two coins being tossed at the same time. In the coding activity, you'll take the pseudocode from the unplugged activity and use it to code your micro:bit. In the project, you'll code your own unique program using Booleans and other blocks that you've explored and learned in the previous units.
## Lesson objectives
-Students will...
-* Understand what booleans and boolean operators are, and why and when to use them in a program.
-* Learn how to create a boolean, set the boolean to an initial value, and change the value of the boolean within a micro:bit program.
-* Learn how to use the random true or false block.
-* Apply the above knowledge and skills to create a unique program that uses booleans and boolean operators as an integral part of the program.
-
+You will...
+
+* Understand what Booleans and Boolean operators are, and why and when to use them in a program.
+* Learn how to create a Boolean, set the boolean to an initial value, and change the value of the boolean within a micro:bit program.
+* Learn how to use the random **true** or **false** block.
+* Apply the above knowledge and skills to create a unique program that uses Booleans and Boolean operators as an integral part of the program.
+
## Lesson structure
* Introduction: Booleans in daily life
* Unplugged Activity: Two Heads are Better Than One
diff --git a/docs/test/courses/csintro/booleans/activity.md b/docs/test/courses/csintro/booleans/activity.md
index 80ba000a082..d5553019676 100644
--- a/docs/test/courses/csintro/booleans/activity.md
+++ b/docs/test/courses/csintro/booleans/activity.md
@@ -2,30 +2,35 @@
![Example Board](/static/courses/csintro/booleans/fuzzies.jpg)
-Guide the students to create a program using Boolean variables and operators.
-We’ll use our pseudocode from the previous activity to code a double coin flipper program.
-
-For the first step, let’s create our variables.
-Make a variable for each of the following:
-* `CoinAHeads`
-* `CoinBHeads`
-* `PlayerAScore`
-* `PlayerBScore`
-
-Now we need to initialize the variable values.
-Put a 'set' variable block for each of these 4 variables inside the 'on start' block.
-
-The initial value of a variable is the value the variable will hold each time the program starts.
-By default:
-* a string variable is initialized to an empty string `""`
-* a number variable is initialized to `0`
-* a Boolean is initialized to `false`
-
-Initialize the number variables to zero and the Boolean variables to `false`.
+Let's create a program using Boolean variables and operators, using the pseudocode from Lesson A to code a double coin flipper program.
+
+The pseudocode:
+
+* Use the random function to get a true/false value for Coin A.
+
+* Use the random function to get a true/false value for Coin B.
+
+* Compare the current values of Coin A and Coin B.
+ * If the current true/false values of Coin A and Coin B are the same, add a point to Player A’s score.
+ * Otherwise, the current true/false values of Coin A and Coin B must be different, so add a point to Player B’s score.
+* When players are done with their double coin flipping, show the final scores for each player.
-You can find the false blocks under the Logic menu.
+## Initalize the Variables
+
+In Microsoft MakeCode, have students start a new project and name it something like: Double coin flipper. They can leave the ‘on start’ block in the coding Workspace but can delete the ‘forever’ loop block.
-![Logic menu](/static/courses/csintro/booleans/logic-menu.png)
+* For the first step, let’s create our variables. From the Variables Toolbox drawer, use the Make a variable button to create each of the following:
+ * CoinAHeads
+ * CoinBHeads
+ * PlayerAScore
+ * PlayerBScore
+
+* Now, we need to initialize the variable values. Put four ‘set’ variable blocks inside the ‘on start’ block and use the drop-down menu to set the variable for each block to each of the new variables.
+
+* The initial value of a variable is the value the variable will hold each time the program starts. By default:
+ * a string variable is initialized to an empty string: ""
+ * a number variable is initialized to: 0
+ * a Boolean is initialized to: false
```blocks
let CoinAHeads = false
@@ -41,22 +46,15 @@ basic.showLeds(`
`)
```
-Notice that we also added an image for the start screen, so the user knows the program has started and is ready. Does the image look like two coins?
+Leave the number variables at 0 and initialize the Boolean variables to ‘false’. You can find the ‘false’ hexagon blocks under the Boolean section of the Logic Toolbox drawer. Then add an image for the start screen, so the user knows the program has started and is ready. In the example below, the image is intended to look like two coins.
## Random coin flips
-When the player shakes the micro:bit, we will code the micro:bit to give each of our Boolean variables a random true/false value.
-
-* From the Input Toolbox drawer, drag an 'on shake' block to the coding workspace
-* From the Variables Toolbox drawer, drag 2 'set' variable blocks to the coding workspace
-* Drag the 2 'set' blocks into the 'on shake' block
-* Change the default `item` to `CoinAHeads` and `CoinBHeads`
-* From the Math Toolbox drawer, drag 2 'pick random true or false' blocks to the coding workspace
-* Hover over this 'pick random' block and note that its pop-up description mentions coin flipping!
-
-![Pick Math random boolean](/static/courses/csintro/booleans/math-random-boolean.png)
+Let’s use the micro:bit’s *accelerometer* to mimic tossing a coin. The accelerometer measures the acceleration of your micro:bit; this component senses when the micro:bit is moved. It can also detect other actions like shake, tilt, and free fall. When the player shakes the micro:bit, we will code the micro:bit to give each of our Boolean variables a random true/false value.
+
+* From the Input Toolbox drawer, drag an **‘on shake’** block to the coding Workspace. Drag the two **‘Set CoinAHeads’** and **‘Set CoinBHeads’** blocks from the **‘on start’** block into the **‘on shake’** block.
-* Attach these 'pick random' blocks to the 'set' variable blocks in the 'on shake' block
+* From the Math Toolbox drawer, drag two ‘pick random true or false’ blocks to the coding Workspace. Hover over this ‘pick random’ block and note that its pop-up description mentions coin flipping!
```blocks
let CoinBHeads = false
@@ -68,9 +66,10 @@ input.onGesture(Gesture.Shake, () => {
```
Now that the virtual CoinA and CoinB have been virtually flipped, we need to compare the outcomes to see if they are the same or different.
-
+
* From the Logic Toolbox drawer, drag an 'if...then...else' block to the coding workspace
* Drag the 'if...then...else' block into the 'on shake' block under the 'set' variable blocks
+* Drop one each of these ‘pick random’ blocks to the ‘set’ variable blocks in the ‘on shake’ block
```blocks
let CoinBHeads = false
@@ -86,15 +85,30 @@ input.onGesture(Gesture.Shake, () => {
})
```
-Now our logic block is ready for the next steps of our pseudocode.
-1. Compare the current values of Coin A and Coin B.
-2. If the current true/false values of Coin A and Coin B are the same, add a point to Player A’s score.
-3. Otherwise, if the current true/false values of Coin A and Coin B are different, add a point to Player B’s score.
-
-Because we were able to visualize our blocks as we wrote our pseudocode, we already know what blocks we will use and also know that we have simplified our code as much as possible!
-
-* We can now simply add this to our current code
-* And provide user feedback by adding some visuals
+That completes the first two steps of our pseudocode:
+
+* Use the random function to get a true/false value for Coin A.
+* Use the random function to get a true/false value for Coin B.
+
+## Compare current values of both coins
+
+Now that the virtual CoinA and CoinB have been virtually flipped, we need to compare the outcomes to see if they are the same or different, which is the next step of our pseudocode:
+
+Compare the current values of Coin A and Coin B: If the current true/false values of Coin A and Coin B are the same, add a point to Player A’s score. Otherwise, if the current true/false values of Coin A and Coin B are different, add a point to Player B’s score.
+
+* From the Logic Toolbox drawer, drag an **‘if…then…else’** block to the coding Workspace. Then, drag the **‘if…then…else’** block into the **‘on shake’** block under the **‘set’** variable blocks.
+
+* Because we were able to visualize our blocks as we wrote our pseudocode, we already know what blocks we will use and also that we have simplified our code as much as possible! We can now simply add this to our current code and provide user feedback by adding some visuals.
+
+* From the Logic Toolbox drawer, in the Comparison section, drag a **‘0 = 0’** hexagon block to the coding Workspace and replace the ‘true’ hexagon in the **‘if…then…else’** block. Then, from the Variables Toolbox drawer, drag a **‘CoinAHeads’** variable to replace the first 0. You could drag the **‘CoinBHeads’** variable to replace the second 0, but another option is to duplicate the **‘CoinAHeads’** variable, snap it into the second 0, and use the drop-down menu to select **‘CoinBHeads’** option.
+
+* To add a point to Player A’s score, go to the Variables Toolbox drawer and drag a **‘change (variable) by 1’** block into the **‘then’** option and make sure it’s set to the **‘PlayerAScore’** variable. Then to give a visual cue that Player A got the point, go to the Basic Toolbox drawer, drag a **‘show leds’** block and **‘pause’** block onto the coding Workspace and connect them into the **‘then’** option above the **‘change PlayerBScore by 1’** block. In the **‘show leds’** block, select the boxes to show the letter A.
+
+* Do the same for Player B in the ‘else’ option. Instead of dragging the needed blocks from the Toolbox drawers, duplicate the blocks and change the ‘show leds’ block and ‘change PlayerAScore’ variable accordingly.
+
+* To signify the end of the on-shake coin toss, let’s show the two-coin image on the micro:bit again. From the Basic Toolbox drawer, drag a **‘show leds’** block to the coding Workspace and connect it below the conditional blocks. Select the boxes to show the two coins.
+
+* Now, test the code in the Simulator to make sure it works as intended.
```blocks
let PlayerBScore = 0
@@ -135,7 +149,21 @@ input.onGesture(Gesture.Shake, () => {
})
```
-To finish our program, we’ll display the players’ current scores on button A pressed.
+## Show each player’s score
+
+To finish our program, we’ll complete the last step of the pseudocode.
+
+When players are done with their double coin flipping, show the final scores for each player.
+
+We’ll use button A to do this.
+
+* From the Input Toolbox drawer, drag an ‘on button A pressed’ block to the coding Workspace. Duplicate the ‘show leds’ block with the letter A and connect it inside the ‘on button A pressed’ block. Then, from the Basic Toolbox drawer, drag the ‘show number’ block to the Workspace and connect it below the ‘show leds’ block.
+
+* From the Variables Toolbox drawer, drag a ‘PlayerAScore’ variable to replace the 0.
+
+* Let’s add a pause before showing Player B’s score. Use the drop-down menu and select 500 ms. Then, follow the previous steps to show Player B’s score. Try to complete this without going into the Toolbox! Hint: Use duplicates and drop-down menus.
+
+* The final steps are to add another 500 ms pause and have the micro:bit show the double coins to signify it’s ready for another on-shake coin toss.
Here is the complete program for our Double Coin Flipper.
@@ -181,25 +209,24 @@ input.onGesture(Gesture.Shake, () => {
. . . # .
`)
})
-```
+```
-Try it out!
-Have the students play a few more rounds of the Double Coin Flip using their new micro:bit Double Coin Flipper!
-
-## Boolean operator NOT in a Loop
+Solution link: [makecode.microbit.org/_YHuAxKere6vM]()
-```block
-input.onGesture(Gesture.Shake, () => {
- while (!(input.buttonIsPressed(Button.A))) {
- for (let i = 0; i < 2; i++) {
- music.playTone(262, music.beat(BeatFraction.Half))
- music.playTone(523, music.beat(BeatFraction.Half))
- }
- }
-})
-```
+## Test, Download, and Play! Try it out!
+
+Test your code on the Simulator. Then, download to the micro:bit and try it out! Play a few more rounds of the Double Coin Flip using your new micro:bit Double Coin Flipper!
+
+## Knowledge Check
+
+Questions:
+
+1. How many values can a Boolean have?
+2. Name the three common Boolean operators we have discussed in this unit?
+3. Why do we set the initial value of a variable inside the **‘on start’** block?
-Do you remember this code from our micro:bit Alarm?
-Can you read this code and tell what it does?
+Answers:
-_If the micro:bit is shaken, the micro:bit will play two tones twice and keep repeating this action until button A is pressed. So, after shaking, as long as ‘is button A pressed?’ is false, the two tone alarm will continue to repeat._
+1. A Boolean data type has only two values: true or false.
+2. And, Or, Not
+3. The initial value of a variable is the value the variable will hold each time the program starts.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/booleans/overview.md b/docs/test/courses/csintro/booleans/overview.md
index 2ad4b95869a..f5b2856d3bc 100644
--- a/docs/test/courses/csintro/booleans/overview.md
+++ b/docs/test/courses/csintro/booleans/overview.md
@@ -1,69 +1,70 @@
# Introduction
There are several different data types used in computer programming. We have already used two of these types:
-* [String](/types/string) (for text)
-* [Integer](/types/number) (for numbers)
-Boolean is another type of data. A boolean data type has only two values: true or false.
-In true binary fashion, these two values can be represented by the numbers 1 = true, and 0 = false.
-
-Booleans are useful in programming for decision-making, often deciding when certain functions and parts of programs should start or stop running and are also used in database searches.
-
-Ask the students to think of things in daily life that have only two values or states. The status is always one value or the other value.
-
-Examples of Booleans in daily life
+* [String](/types/string) (for text and alphanumeric characters)
+* [Integer](/types/number) (for integer and decimal values)
+
+**Boolean** is another type of data. A Boolean data type has only two values: **true** or **false**. In true binary fashion, these two values can be represented by the numbers: 1 = true, and 0 = false.
+
+Booleans are useful in programming for decision making, often deciding when certain functions and parts of programs should start or stop running. They’re also used in database searches.
+
+Can you think of things in your daily life that have only two values or states? The status must always be one value or the other value.
+
+Examples of Booleans in daily life:
+
* Lights: On or Off
* Time: AM or PM
-* You!: Asleep or Awake
+* You: Asleep or Awake
* Weather: Raining or Not Raining
* Math: Equal to or Not Equal to
* Game: Truth or Dare
* Soda: Coke or Pepsi
* At the store: Paper or Plastic? Cash or Credit? Chip or Swipe?
-Note:
-Arguments can be made that some of these can have more than two values.
-For example: At the store, you may have brought your own reusable bags or pay by check.
-Let the students discuss these to help them hone in on which examples best represent Booleans.
+>**Note:** Arguments could be made that some of these can have more than two values. For example: At the store, you may have brought your own reusable bags or pay by check. Which of these examples best represent Booleans?
-A student might argue that a dimmer switch on a light or the brightness value on the micro:bit LEDs allow the lights to be in a state between on and off. One could respond that you can classify ‘on’ as the state where any electricity at all is running through the bulb (on) versus no electricity at all (off).
-
-In programming, if you have worked with conditionals or loops, you have already worked with this type of logic:
-* If a certain condition is true, do this, otherwise (if condition is false), do something else.
-* While a certain condition is true, do this
-
-Boolean Operators: AND, OR, and NOT
-To make working with Booleans useful for solving more complex decisions and searches, we can connect two or more Booleans into one decision statement. To do this, we use what are known as Boolean operators. The three most common and the ones we will use with the micro:bit are And, Or, and Not.
+In programming, if you have worked with conditionals or loops, you have already worked with this type of logic, just like we’ve done in previous units (Unit 4: Conditionals and Unit 5: Iteration).
+
+* If a certain condition is true, do this; otherwise (if condition is false), do something else.
+
+* While a certain condition is true, do this.
+
+## Boolean Operators: AND, OR, and NOT
+
+To make working with Booleans useful for solving more complex decisions and searches, we can connect two or more Booleans into one decision statement. To do this, we use what are known as **Boolean operators.** The three most common and the ones we will use with the micro:bit are **And, Or,** and **Not.**
These operators can be used in conditionals and loops, like so:
+
* If condition A is true AND condition B is true
* If condition A is true OR condition B is true
* While event A has NOT happened
Let’s look at how each of these work.
-## AND
-(Condition A AND Condition B)
-For this expression to evaluate as true, both conditions in the expression need to be true.
-So, if both Condition A AND Condition B are true, the expression will evaluate as or return true.
-
-## OR
-(Condition A OR Condition B)
-For this expression to evaluate as true, only one of the conditions in the expression needs to be true.
-If Condition A is true, the expression will return true regardless of whether Condition B is true or false.
-If Condition B is true, the expression will return true regardless of whether Condition A is true or false.
-
-## NOT
-NOT can be used when checking that a condition is false (or not true).
-For example:
+### AND
+(Condition A AND Condition B): For this expression to evaluate as true, both conditions in the expression need to be true. So, if both Condition A AND Condition B are true, the expression will evaluate as (or return) true.
+
+### OR
+
+(Condition A OR Condition B): For this expression to evaluate as true, only one of the conditions in the expression needs to be true. If Condition A is true, the expression will return true regardless of whether Condition B is true or false. If Condition B is true, the expression will return as true regardless of whether Condition A is true or false.
+
+### NOT
+
+NOT can be used when checking that a condition is false (or not true). For example:
+
* (NOT Condition A and Condition B) evaluates as true only if Condition A is false and Condition B is true.
+
* (Condition A and NOT Condition B) evaluates as true only if Condition A is true and Condition B is false.
+
* (NOT Condition A and NOT Condition B) evaluates as true only if both Condition A and Condition B are true.
-NOT is also useful when using a loop. For example, you can use a NOT to check
-While button A is NOT pressed, continue to run this code…
-
-Note: ‘False’ can be thought of as equivalent to ‘NOT true’.
+
+NOT is also useful when using a loop. For example, you can use a NOT to check:
+
+* While button A is NOT pressed, continue to run this code…
+
+>**Note:** “False” can be thought of as equivalent to “NOT true”.
## Sidebar material
![George Boole](/static/courses/csintro/booleans/george-boole.jpg)
diff --git a/docs/test/courses/csintro/booleans/project.md b/docs/test/courses/csintro/booleans/project.md
index d3e51a8698f..2535c377968 100644
--- a/docs/test/courses/csintro/booleans/project.md
+++ b/docs/test/courses/csintro/booleans/project.md
@@ -2,21 +2,60 @@
![Two-Player Game Example Board](/static/courses/csintro/booleans/two-player.jpg)
-This is an assignment for students to come up with a micro:bit program that uses Boolean variables, Boolean operators, and possibly the random function.
+In this project, you will come up with a micro:bit program that uses Boolean variables, Boolean operators, and possibly the random function.
+## Project Expectations
+
+Follow the design thinking approach and make sure your project meets these specifications:
+
+* More than two Boolean variables are implemented in a meaningful way.
+* The micro:bit program uses Booleans in a way that is integral to the program.
+* The program compiles and runs as intended and includes meaningful comments in code.
+* Provide the written Reflection Diary entry.
+
## Input
-Remind the students of all the different inputs available to them through the micro:bit.
-![micro:bit input list](/static/courses/csintro/variables/input-list.png)
-
+Don't forget to consider all the different inputs available to you through the micro:bit.
+
+**Available inputs:**
+
+* Acceleration
+* Light level
+* Rotation
+* Button is pressed
+* Compass heading
+* Temperature
+* Running time
+* On shake
+* On button pressed
+* On logo down
+* On logo up
+* On pin pressed
+* On screen down
+* On screen up
+* Pin is pressed
+
## Project Ideas
+Use Boolean variables and/or random values to create:
+
+* A board game, game pieces, and holder for the micro:bit (or improve your board game from Unit 3: Variables)
+
+* A mod of some sort to a current/existing board game
+
+* A micro:bit version of a Magic Eight Ball
+
+## Project Examples
+
### Sunscreen Monitor
-When you shake the micro:bit, it reports the current temperature in degrees Fahrenheit. Button B measures the light level and if it is above 70 degrees AND very bright, it will display a sun icon. If it is above 70 degrees and less bright, it will display a cloudy symbol. If it is dark, it will display a nighttime icon.
+The micro:bit is attached to a bottle of sunscreen and provides information about the temperature and if you need sunscreen:
-[**micro:bit Sunscreen Monitor**](https://youtu.be/VmD-dcZZQFc)
-https://youtu.be/VmD-dcZZQFc
+* When you shake the micro:bit, it reports the current temperature in degrees Fahrenheit.
+
+* Button A displays an animation to tell you whether or not you should use sunscreen (on sunny or cloudy days but not at night or indoors).
+
+* Button B measures the light level, and if it is above 70 degrees AND very bright, it will display a sun icon. If it is above 70 degrees and less bright, it will display a cloudy symbol. If it is dark, it will display a nighttime icon. Check it out in action here: [youtu.be/VmD-dcZZQFc](here) (0:18)
#### Sunscreen code
@@ -170,33 +209,15 @@ input.onGesture(Gesture.Shake, () => {
})
```
-Button A displays an animation to tell you whether or not you should use sunscreen (on sunny or cloudy days but not at night or indoors.)
-
-Make a holder that can hold the micro:bit and a bottle of sunscreen.
-
-This example uses boolean operations because both light level AND temperature must be high in order to trigger the sun icon:
-
-```block
-if (128 > input.lightLevel() && 0 < input.lightLevel() && input.temperature() > 22) {}
-```
-### ~ hint
-
-The @boardname@ uses some clever tricks to measure both light and temperature. Want to see how it can measure the light level and temprature? Watch these videos to learn how it does it.
-
-https://www.youtube.com/watch?v=TKhCr-dQMBY
-
-https://www.youtube.com/watch?v=_T4N8O9xsMA
-
-### ~
+Solution link: [makecode.microbit.org/_Atd9Wti3MiUj]()
### Two-player game
-Create a game in which two players take turns on the same micro:bit. You can use a boolean variable called PlayerATurn to keep track of whose turn it is.
+This is an example of a board game in which the micro:bit displays an arrow pointing in a random direction. The paper legend indicates different actions the player must take, and it uses a Boolean variable to keep track of whose turn it is.
**Board Game:** Use boolean variables and random values as part of a board game (or improve your Board Game from the Variables lesson). Make the board and pieces and a holder for the micro:bit. Try modding a current board game.
![Two player game project](/static/courses/csintro/booleans/two-player-game.png)
-Board Game with Arrows
#### Board game arrow code
@@ -319,38 +340,15 @@ input.onGesture(Gesture.Shake, () => {
}
})
```
+
+Solution link: [makecode.microbit.org/_1mY4wq4KPYiq]()
+
## Reflection
-Have students write a reflection of about 150–300 words, addressing the following points:
+Write a short reflection of about 150–300 words, addressing the following points:
+
* How did you incorporate boolean variables into your micro:bit program?
* How did you incorporate boolean operators into your micro:bit program?
* Describe something in your project that you are proud of.
* If you had more time to work on this project, describe what you might add or change.
-
-## Assessment
-
-**Competency scores**: 4, 3, 2, 1
-
-### Boolean
-
-**4 =** More than 2 Boolean variables are implemented in a meaningful way.
-**3 =** At least 2 Boolean variables are implemented in a meaningful way.
-**2 =** At least 1 Boolean variable is implemented in a meaningful way.
-**1 =** No Boolean variables are implemented.
-
-### micro:bit program
-
-**4 =** micro:bit program:
-`*` Uses Booleans in a way that is integral to the program.
-`*` Compiles and runs as intended
-`*` Meaningful comments in code
-**3 =** micro:bit program lacks 1 of the required element.
-**2 =** micro:bit program lacks 2 of the required elements.
-**1 =** micro:bit program lacks all of the required elements.
-
-### Collaboration reflection
-
-**4 =** Reflection piece addresses all prompts.
-**3 =** Reflection piece lacks 1 of the required elements.
-**2 =** Reflection piece lacks 2 of the required elements.
-**1 =** Reflection piece lacks 3 of the required elements.
+* Publish your MakeCode program and include the link.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/booleans/unplugged.md b/docs/test/courses/csintro/booleans/unplugged.md
index a75c86a1ca2..1af5a395f09 100644
--- a/docs/test/courses/csintro/booleans/unplugged.md
+++ b/docs/test/courses/csintro/booleans/unplugged.md
@@ -1,16 +1,15 @@
# Unplugged: Two heads are better than one
-Materials: A penny for each student, paper and pencils
+A penny, paper, and a pencil
-Most students have used a penny to decide something. Ask for some examples.
-Who goes first in a game, to break a tie, to decide which activity to do...
+Most people have used a penny to decide something. Some examples might include: Who goes first in a game, to break a tie, to decide between two activities...
A simple penny is the most common binary decision making tool ever!
+
When you flip a coin to decide something there are only two possible outcomes, heads or tails.
-When you flip a coin the outcome is random.
+When you flip a coin, the outcome is random.
-
-What’s a common issue with coin tosses? Students may bring up issues of trust and fairness. Who gets to flip the coin? Who gets to ‘call’ it? What if it’s a ‘faulty’ coin?
+However, a common issue with coin tosses is that of trust and fairness. Who gets to flip the coin? Who gets to ‘call’ it? What if it’s a ‘faulty’ coin?
Here’s a solution... The double coin toss.
@@ -18,7 +17,7 @@ Here’s a solution... The double coin toss.
In a double coin toss, both people have a coin and they flip the coins at the same time.
-Working in pairs, have the students make a table or list of the possible outcomes if each student flipped a coin at the same time.
+Make a table or list of the possible outcomes if each person flipped a coin at the same time. You should end up with something like this:
Example:
@@ -38,9 +37,9 @@ There are 4 possible outcomes.
So, if 2 coins are flipped, the chance that the outcomes will be the same (HH/TT) is equal to the chance that the outcomes will be different (HT/TH). Both outcomes, coins the same/coins are different have a 2 in 4 or 50% chance of occurring.
-Therefore, if Person A wins each time the outcomes are the same and Person B wins each time the outcomes are different, both have an equal chance of winning each double coin flip. With this system, no one person’s outcome, heads or tails, guarantees a win. If Person A’s coin flips to heads, she would win if Person B also flipped heads, but lose if Person B flipped tails. Students will usually see that this is a fair system.
+Therefore, if Person A wins each time the outcomes are the same and Person B wins each time the outcomes are different, both have an equal chance of winning each double coin flip. With this system, no one person’s outcome, heads or tails, guarantees a win. If Person A’s coin flips to heads, she would win if Person B also flipped heads, but lose if Person B flipped tails.
-Let the students experiment with this. Have students flip their coins together, keeping track of the outcomes, perhaps by adding another column to their table.
+Experiment with this and record the results. Flip your coin twice, keeping track of the outcomes, perhaps by adding another column to their table. If there's another person around who can act as the second coin-flipper, that's all the better.
Example:
@@ -52,8 +51,6 @@ Example:
Tails Heads
Tails Tails
```
-
-Just for fun, have them play to a certain total number of rounds.
So, what does this have to do Boolean variables and operators? Think about how you would code a program a double coin flipper. How would you represent each of the 4 different possible double coin flip outcomes?
@@ -66,7 +63,7 @@ We can create a Boolean variable to represent whether an outcome is heads or tai
Note: Tails = False can also be thought of as Tails = not true.
-Have the students copy their Heads/Tails table of possible outcomes, but label the columns "Coin A Heads" and "Coin B Heads" and replace each entry of ‘Heads’ with ‘True’ and ‘Tails’ with ‘False’. In the study of logic, this is known as a truth table.
+Copy your Heads/Tails table of possible outcomes, but label the columns "Coin A Heads" and "Coin B Heads" and replace each entry of ‘Heads’ with ‘True’ and ‘Tails’ with ‘False’. In the study of logic, this is known as a **truth table.**
We’ll use it to help us pseudocode our program, by adding a third column describing the results of each outcome.
@@ -82,16 +79,14 @@ We’ll use it to help us pseudocode our program, by adding a third column descr
Can we make this code more efficient? Can we combine any of these lines? Try using an OR to combine both conditions in which Player A scores a point. Do the same for both conditions in which Player B scores a point.
-Give the students a chance to work this out on their own.
-
-Combining the conditions in which each player wins, gives us:
+Combining the conditions in which each player wins gives us:
* If (Coin A is true AND Coin B is true) OR (Coin A is false AND Coin B is false), add one to Player A score.
* If (Coin A is true AND Coin B is false) OR (Coin A is false AND Coin B is true), add one to Player B score.
-Note: Just as you do for math expressions with multiple operators, use parentheses to make it clear how the conditions and statements are grouped together.
+>**Note:** Just as you do for math expressions with multiple operators, use parentheses to make it clear how the conditions and statements are grouped together.
-The students are by now familiar with the MakeCode blocks. As they think through their algorithms, they may even have started to visualize the blocks they might use. Visualizing the blocks as they pseudocode can help them with the logical steps of their program. It can also help them to visualize and recognize the big picture of their code as well as the details.
+By now, you should be familiar with the MakeCode blocks. As you think through your algorithms, you may even have started to visualize the blocks you might use. Visualizing the blocks as you pseudocode can help with the logical steps of your program. It can also help you to visualize and recognize the big picture of your code as well as the details.
Using blocks to start coding these two conditionals as currently written, might look like this:
@@ -115,7 +110,7 @@ Though this code will work as we want it to, it’s a lot of code. It is good pr
## Booleans and simplifying code
-A boolean can have only one of two values: True or False. Conditionals like 'if...then' check whether a condition is true. Notice that the default condition for the 'if...then' blocks is true. In other words, the 'if...then' blocks will check to see whether whatever condition you place there is true.
+A boolean can have only one of two values: **True** or **False.** Conditionals like **'if...then'** check whether a condition is true. Notice that the default condition for the **'if...then'** blocks is true. In other words, the **'if...then'** blocks will check to see whether whatever condition you place there is true.
```block
basic.forever(() => { if (true) { } })
@@ -173,9 +168,9 @@ basic.forever(() => {
We use a coin flip to decide things because the result is random, meaning the result happens without any conscious decision or direction. We use dice and game spinners for the same reason. The results are not predetermined or directed in any way.
-So, how do we get a random flip in code? Most computer programming languages have a built in function that will select a random number given a range of values. Microsoft MakeCode has a block for this. And it also has a block for getting a random true or false value.
+So, how do we get a random flip in code? Most computer programming languages have a built in function that will select a random number given a range of values. Microsoft MakeCode has a block for this. And it also has a block for getting a random true or false value.
-We will call on this built in function to get a random true or false value for each flip of a coin in the next [activity](/test/courses/csintro/booleans/activity).
+We will call on this built in function to get a random true or false value for each flip of a coin in the next [activity](/courses/csintro/booleans/activity).
Our basic pseudocode for our 'double coin flipper' could look like this:
@@ -184,4 +179,4 @@ Our basic pseudocode for our 'double coin flipper' could look like this:
3. Compare the current values of Coin A and Coin B.
4. If the current true/false values of Coin A and Coin B are the same, add a point to Player A’s score.
5. Otherwise, the current true/false values of Coin A and Coin B must be different, so add a point to Player B’s score.
-6. When players are done with their double coin flipping, show the final scores for each player.
+6. When players are done with their double coin flipping, show the final scores for each player.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/conditionals/project.md b/docs/test/courses/csintro/conditionals/project.md
index 47f3873faea..979ffd434e7 100644
--- a/docs/test/courses/csintro/conditionals/project.md
+++ b/docs/test/courses/csintro/conditionals/project.md
@@ -70,12 +70,16 @@ input.onGesture(Gesture.Shake, () => {
```
Solution link: [https://makecode.microbit.org/_0fx9hY9EbM5T]()
-### Bonus
+### ~ hint
+
+#### Bonus
The micro:bit uses its accelerometer to detect when you're shaking it. How does an accelerometer actually work?
[https://www.youtube.com/watch?v=byngcwjO51U]()
+### ~
+
### Space Race
How to win: Starting from Earth, your goal is to progress to Mars. The first person to reach Mars is the winner.
diff --git a/docs/test/courses/csintro/introduction.md b/docs/test/courses/csintro/introduction.md
index d8bff817e1c..de64de8868b 100644
--- a/docs/test/courses/csintro/introduction.md
+++ b/docs/test/courses/csintro/introduction.md
@@ -1,23 +1,26 @@
# Introduction
-When we first started teaching computer science, we discovered two important things. We found that existing curriculum for beginners focused mostly on solving math problems or constructing geometric shapes and that there was a certain type of student that signed up for computer science classes and these students were almost always boys. We wondered whether a different approach to teaching the basics of computer programming would be more engaging and also attract a larger variety of different types of students, both boys and girls.
-
-We decided to focus on what knowing how to program allowed you to do and create. Ultimately all programs are created to solve a problem or serve a purpose. The problem may be local or global, the purpose may be anything from helping doctors treat patients to pure entertainment. By starting with interesting problems the students wanted to solve, they were much more engaged in learning to code. They saw coding skills as an important part of building creative solutions.
+When we first started teaching computer science, we noticed something interesting. Most of the beginner courses were focused on math problems or creating geometric shapes, and it was mostly boys signing up. That made us wonder: what if we could teach programming in a way that was more exciting and fun for everyone?
-With this approach, we found that not only did we get more girls taking the course, we also got a more diverse group of boys. Opportunities for collaboration increased, and all the students got to see where their talents and skills meshed with others' interests and experiences, to make a whole that was greater than the sum of its parts.
+So, we changed things up! Instead of just focusing on the math, we decided to show what programming can help you create. After all, coding is all about solving problems and making things that matter. You could use it to help doctors treat patients, make games that entertain people, or tackle big issues around the world. When our students got to work on problems they cared about, they were way more interested in learning to code. They saw programming as a super cool tool for building their own creative solutions.
-We are now at the point where a third of the students taking computer science are girls, and more importantly, students are coming out of the course not only with an understanding of code, but also knowing how to read through professionally written code, and take an idea from brainstorming through prototyping to build something that matters.
+And guess what? It worked! We started seeing more girls joining the class, along with boys who brought different interests and ideas. Everyone got to collaborate more, which made the class even better because each student brought something unique to the table.
+
+Now, about a third of the students in our computer science classes are girls, and the best part? They’re not just learning how to code—they’re learning how to think like real developers. From brainstorming ideas to building prototypes, our students are creating things that really make a difference. And that’s what this course is all about!
> _- Authors Mary Kiang and Douglas Kiang_
## Course Introduction
-This is an introduction to coding and computer science by way of making and design, using the revolutionary new micro:bit microcontroller board, and Microsoft's easy and powerful MakeCode block-based coding environment. It is a project-based curriculum with a maker philosophy at its core; the idea is that by making physical objects, students create a context for learning the coding and computer science concepts.
+Get ready for an awesome introduction to coding and computer science through hands-on making and design! You’ll be using the micro:bit
+microcontroller board, along with Microsoft’s MakeCode, a block-based coding tool that's both easy to use and super powerful.
+
+In this course, you’ll be working on projects where you actually build things—real, physical objects! The idea is that by creating something you can hold in your hands, you’ll naturally learn important coding and computer science concepts. It’s all about learning by doing, and we can’t wait to see what you create!
![micro:bit man](/static/courses/csintro/microbitman.jpg)
* micro:bits may be purchased from these resellers:
-> http://microbit.org/resellers (you will need 1 micro:bit per student for this course). The "micro:bit Go Kit" includes a battery pack and USB cable as well.
+> http://microbit.org/resellers (you will need at least 1 micro:bit for this course). The "micro:bit Go Kit" includes a battery pack and USB cable as well.
* Other optional suggested micro:bit accessories include:
@@ -30,13 +33,13 @@ This is an introduction to coding and computer science by way of making and desi
* MakeCode for the micro:bit is a free web app: https://makecode.microbit.org
-Copper tape is inexpensive and super useful in all sorts of maker activities so it’s worth it to invest in a few rolls to keep on hand for micro:bit projects. We use it in [Lesson 9 (Binary Cash Register)](/test/courses/csintro/binary/project). You can purchase copper tape at https://www.adafruit.com/product/1128/ and https://www.sparkfun.com/products/10561.
+Copper tape is inexpensive and super useful in all sorts of maker activities so it’s worth it to get a roll to keep on hand for micro:bit projects. We use it in [Lesson 9 (Binary Cash Register)](/test/courses/csintro/binary/project). You can purchase copper tape from vendors such as Adafruit and Sparkfun.
-When students complete this course they will have a good understanding of computer science concepts that can serve as the foundation for future study. They will develop powerful design skills that they can use in future projects of all types, whether they are designing 3D printed prototypes or creating apps that serve a real world purpose.
+By the time you finish this course, you'll have a solid understanding of key computer science concepts that will set you up for future learning. Plus, you'll build awesome design skills that can be used in all sorts of future projects, whether you’re creating 3D-printed prototypes or developing apps that solve real-world problems.
-This course is targeted to middle school grades 6-8 (ages 11-14 years). It is also written for teachers who may not have a Computer Science background, or may be teaching an "Intro to Computer Science" course for the first time.
+This course is designed for students in grades 6-8 (ages 11-14). It is designed for people who might not have a background in Computer Science or even teachers who are teaching an "Intro to Computer Science" class for the first time. So, everyone can jump in and learn together!
-This course takes approximately 14 weeks to complete, spending about 1 week on each of the first 11 lessons, and 3 weeks for students to complete the final project at the end. Of course, teachers should feel free to customize the curriculum to meet individual school or district resources and timeframe.
+The course takes about 14 weeks to finish, if you are working on it for a few hours a week. You’ll spend roughly one week on each of the first 11 lessons, and then you’ll need about three weeks to work on an exciting final project. But of course you can always adjust the timeline to fit your needs. This course is flexible and designed to work for you!
## Overall Course Scope & Sequence:
@@ -51,37 +54,33 @@ This course takes approximately 14 weeks to complete, spending about 1 week on e
9. [Bits, bytes, and binary](/test/courses/csintro/binary)
10. [Radio](/test/courses/csintro/radio)
11. [Arrays](/test/courses/csintro/arrays)
-12. [Independent final project](/test/courses/csintro/finalproject)
+12. [Accekerometer](/test/courses/csintro/accelerometer)
+13. [Independent final project](/test/courses/csintro/finalproject)
-Each of the 12 lessons is comprised of the following parts:
+Each lesson is made up of the following parts:
* Topic Introduction
-* Unplugged Activity (30 min) ̶ An offline game or activity that demonstrates the concept/topic
-* micro:bit Activity (45-60 min) ̶- An activity that everyone makes on their micro:bit that teaches the skills learned in this lesson.
-* Project (60-120 min) ̶- A prompt for an original project that each student will create to demonstrate their understanding of the skills and concepts covered in this lesson.
-* Project Mods ̶ Examples of additional things students can do to extend the project
-* Assessment ̶- A project rubric and guidance for grading the project.
-* Standards ̶ -A list of [CSTA K-12 Computer Science Standards](https://www.csteachers.org/?page=CSTA_Standards) and/or concepts covered by this lesson.
+* micro:bit Activity (45-60 min) An activity that everyone makes on their micro:bit that teaches the skills learned in this lesson.
+* Project (60-120 min) A prompt for an original project that you can create to practice the skills and concepts covered in this lesson.
+* Project Mods: Examples of additional things you can do to extend the project
+* Standards: A list of [CSTA K-12 Computer Science Standards](https://www.csteachers.org/?page=CSTA_Standards) and/or concepts covered by this lesson.
### Topic introduction
-The introduction to each lesson will tell you what learning objectives are covered in the lesson, and presents an overview of that lesson's topic. Some lessons have a specific activity that can help introduce the topic to students in a fun way.
-
-### Unplugged activity (30 min)
-Each lesson starts with an unplugged activity, which doesn't require a computer or a micro:bit. It's a chance to get students up and moving around, and is designed to be a fun introduction to the computer science concept covered in that lesson. Unplugged activities are an important way to demonstrate new concepts in a tangible, often kinesthetic, way. Since so many computer-based topics are abstract, unplugged activities are very effective at fostering understanding that students will then demonstrate in later activities.
+The introduction to each lesson will tell you what learning objectives are covered in the lesson, and presents an overview of that lesson's topic.
### micro:bit activity (45–60 min)
-Each lesson also contains a micro:bit activity, which we informally refer to as a "birdhouse" activity, after the innumerable wooden birdhouses so many of us made in wood shop as a way to master basic skills. Each lesson's micro:bit activity is an example that walks students step-by-step through building a project that demonstrates that lesson's topic. By the time students finish the activity, they will have written code that they can use in a different project of their own design.
+Each lesson contains a micro:bit activity, which is an example that walks you step-by-step through building a project that demonstrates that lesson's topic. By the time you finish the activity, you will have written code that you can use in a different project of their own design.
-Some students will finish the activity more quickly than others. Those students can then be a helpful resource for their classmates, or they can challenge themselves by modifying, or "modding" the activity to do something different. We have provided examples and suggestions at the end of many of these activities, and feel free to suggest your own (or encourage your students to come up with their own ideas!)
+You can always challenge yourself by modifying, or "modding" the activity to do something different. We have provided examples and suggestions at the end of many of these activities, and feel free to come up with your own!
### Project (60–120 min)
-After presenting the concept in an unplugged fashion, then walking students through a demonstration activity, it is time to challenge students to use those skills to create something that is creative and original. Students will be working on their projects in a "collaboratively independent" way, which means each student is responsible for turning in his or her own project, but are encouraged to work together and help each other while doing so. Some form of reflection is an important part of documenting the learning that has taken place, and it's a great idea to share out the final projects and reflections, either at an event or on a blog.
+After the demonstration activity, it is time to challenge yourself to use those same skills to create something that is creative and original. This is where the real learning takes place because instead of following step by step instructions, you will prove to yourself that you can use those skills in a new way to create something that is personal and unique.
There are also a series of Project Mods that students can do to extend the project they have created. These are useful for students who already have some experience with coding or who want an extra challenge.
-### Assessment
-A rubric is provided for each project that can be customized according to what students are being asked to demonstrate. For the Activities we just expect students to do them, so those are fairly simple to check off. For the Projects, however, there is often a range of grades based on how closely the project meets the specifications of the assignment.
+### Journal
+From time to time we will ask you to write down your reflections in a journal. Keeping a personal journal is a powerful tool! It helps you track your progress, organize your thoughts, and see how much you've grown over time. By writing down what you learned from each activity and project, you’ll deepen your understanding and notice patterns in your problem-solving process. Plus, it’s a great way to celebrate your successes and identify areas for improvement, making you a more thoughtful and confident learner!
### Standards
Where applicable, we have mapped each of the lessons to the [Computer Science Teachers Association (CSTA) K-12 Standards](https://www.csteachers.org/?page=CSTA_Standards), which are US nationally recognized standards for computer science education.
diff --git a/docs/test/courses/csintro/making.md b/docs/test/courses/csintro/making.md
index 47d373830d3..1f42b1a9759 100644
--- a/docs/test/courses/csintro/making.md
+++ b/docs/test/courses/csintro/making.md
@@ -1,31 +1,24 @@
# Making with micro:bit
-This Lesson introduces the micro:bit as a piece of hardware that has a specific size and weight, and
-generally must be supported and incorporated as an essential component of a tangible artifact. Focus
-on incorporating the physical micro:bit into a basic making activity.
+This lesson introduces the design thinking process as a way to design something that meets someone else's needs. By focusing on building the micro:bit into a pysical object, you'll gain experience in working with a piece of hardware that has a specific size and weight, and that needs to be supported and held securely.
![micro:bit board](/static/courses/csintro/making/microbit-board.png)
## Lesson objectives
-Students will...
+You will...
* Exercise creativity and resourcefulness by coming up with ideas for using simple household materials to accommodate the micro:bit’s size and weight in many different ways.
-* Test and iterate using different materials and sizes in order to create an optimal design to house the micro:bit and battery pack
+* Test and iterate using different materials and sizes in order to create an optimal design to house the micro:bit and battery pack.
* Learn how to download programs and move them to the micro:bit file to run on the micro:bit.
* Use the design thinking process to develop an understanding for a problem or user need.
-* Apply their understanding in a creative way by making a “micro:pet” creature.
+* Apply your understanding in a creative way by making a “micro:pet” creature.
## Lesson plan
* [**Introduction**: The micro:bit is for making](/test/courses/csintro/making/introduction)
-* [**Unplugged**: Design Thinking](/test/courses/csintro/making/unplugged)
* [**Activity**: MakeCode download](/test/courses/csintro/making/activity)
* [**Project**: micro:pet (including mods and rubric)](/test/courses/csintro/making/project)
-## Flipgrid
-
-The [Flipgrid](https://info.flipgrid.com/) topic for the **Making** lesson: https://flipgrid.com/5773f935
-
## Related standards
[Targeted CSTA standards](/test/courses/csintro/making/standards)
\ No newline at end of file
diff --git a/docs/test/courses/csintro/making/activity.md b/docs/test/courses/csintro/making/activity.md
index aa81a09f8b7..7cb9d3773f6 100644
--- a/docs/test/courses/csintro/making/activity.md
+++ b/docs/test/courses/csintro/making/activity.md
@@ -4,9 +4,9 @@
**Objective:** Learn how to download programs from the MakeCode tool.
-**Overview:** Students will create a simple program in Microsoft MakeCode and download it to their micro:bit using a USB cable.
+**Overview:** You will create a simple program in Microsoft MakeCode and download it to your micro:bit using a USB cable.
-For this activity, students will each need a micro:bit, a micro-USB cable, a computer, and a battery pack.
+For this activity, You will need a micro:bit, a micro-USB cable, a computer, and a battery pack.
![micro:bit kit](/static/courses/csintro/making/microbit-kit.jpg)
@@ -26,13 +26,13 @@ basic.forever(() => {
})
```
-At the bottom of of the editor, name the project as "Happy Sad Face" and click on the disk icon to save the project.
+At the bottom of of the editor, name the project "Happy Sad Face" and click on the disk icon to save the project.
![Save file](/static/courses/csintro/making/happy-sad-file.jpg)
Now, click on **Home** to go back to the home screen.
-At the right of **My Projects** on the home screen, click on the **Import** button and then click on **Import File** in the import dialog. Select the file that you just saved to your computer in the previous step.
+At the right of **My Projects** on the home screen, click on the **Import** button and then click on **Import File** in the import dialog. Select the file that you just saved to your computer in the previous step.
![Import button](/static/courses/csintro/making/import-button.png)
@@ -86,6 +86,6 @@ To move the program to your micro:bit, drag the downloaded "microbit-xxxx.hex" f
The micro:bit will hold one program at a time. It is not necessary to delete files off the micro:bit before you copy another onto the micro:bit; a new file will just replace the old one.
-For the next project, your students should attach the battery pack (it takes 2 AAA batteries) to the micro:bit using the white connector. That way they can build it into their design without having to connect it to the computer.
+For the next project, attach the battery pack (it takes 2 AAA batteries) to the micro:bit using the white connector. That way you can build it into your design without having to connect it to the computer.
![Battery pack](/static/courses/csintro/making/battery-pack.jpg)
diff --git a/docs/test/courses/csintro/making/introduction.md b/docs/test/courses/csintro/making/introduction.md
index afdf220f51b..8b8e58f8e58 100644
--- a/docs/test/courses/csintro/making/introduction.md
+++ b/docs/test/courses/csintro/making/introduction.md
@@ -1,12 +1,13 @@
# Introduction
-The micro:bit is a great way to teach the basics of programming and computer science. The Microsoft MakeCode block-based coding environment is a powerful and intuitive way to make the micro:bit react to all sorts of input, and you can introduce fundamental concepts such as iteration, conditional statements, and variables using MakeCode.
+The micro:bit is an awesome way to start learning how to code and understand the basics of computer science. You’ll be using the Microsoft MakeCode platform, which lets you create programs by dragging and dropping blocks of code—kind of like building with digital LEGO pieces. It’s easy to use, and with it, you can make the micro:bit
+respond to different inputs and learn important coding concepts like loops (doing something over and over), if-then statements (making decisions in code), and variables (storing and using information).
-Students often focus primarily on the 5x5 LED screen for providing output. Although this is the most directly accessible way to see a reaction to some kind of input, there are many more creative possibilities when you encourage your students to see the micro:bit as a “brain” that can control physical, tangible creations.
+A lot of people focus on the micro:bit's 5x5 LED display because it’s a quick way to see your program in action. But there’s so much more you can do! Think of the micro:bit as the “brain” behind all kinds of physical creations. It can control things you build in real life—not just what happens on its tiny screen.
-These creations don’t have to be complex or highly technical. It’s great to have students building with common household supplies. Because the micro:bit is so lightweight, and supports so many sensors, it can be incorporated easily into a physical design as long as students plan ahead for its size and weight. One of the first questions you might ask students is “Where does the micro:bit fit in your creation?”
+Your creations don’t need to be super complicated. You can make awesome stuff using everyday materials like cardboard, paper, or whatever else you have around. Since the micro:bit is lightweight and has lots of built-in sensors, it’s easy to add to your designs. Just think ahead about where the micro:bit will fit in your project.
-In this first lesson’s project, we focus on making something creative that features the micro:bit as its “face”. We purposely start this course with a lesson on Making and the physical nature of the micro:bit, because it is important to set the tone for the whole course that this is a class about making, building, crafting and construction. It helps if you have an art room available where kids can work, or arts and crafts supplies in your classroom that kids can use to build.
+For this first project, we’re going to make something creative where the micro:bit acts as the “face” of your animal. We’re starting this way to show that this class is all about making, building, and creating things with your hands. If you have an art room or crafting supplies nearby, that’s perfect! You’ll be able to use those to bring your ideas to life.
Some common making supplies to gather:
@@ -21,4 +22,49 @@ Some common making supplies to gather:
* string
* markers
-![Maker materials](/static/courses/csintro/making/maker-materials.png)
\ No newline at end of file
+![Maker materials](/static/courses/csintro/making/maker-materials.png)
+
+# Activity: Design Thinking
+
+![Design thinking](/static/courses/csintro/making/design-thinking.png)
+
+Note: The project later in this unit will use the work you have done in this activity, so it's important not to skip it.
+
+**Objective:** To introduce a process of design that starts with talking to another person. Whatever you build with code should serve a purpose or fill a need. Sometimes what you build will make the world more beautiful, or help somebody else. Our design process, based on a process called design thinking, will give you a specific framework for thinking purposefully about design.
+
+**Overview:** In this activity, you will interview a friend or a family member about their ideal pet. You should take notes. The first step in coding by design involves understanding someone else’s needs. Then, you can create prototypes that get you closer and closer to the best solution.
+
+**Materials:** A partner, and something to take notes on
+
+**Getting started:**
+The goal of this activity is to gather information from your partner that will help you to design a micro:bit pet for your partner.
+
+**5 minutes:** Interview your partner. The goal is to find out what your partner considers to be their ideal pet. You should mostly listen, and ask questions to keep your partner talking for the entire time. Here are some questions to start with:
+
+* Do you have a pet? What is it?
+* What do you like about your pet? What do you dislike?
+* Is there anything you wish your pet could do? Why?
+* Tell me about your ideal pet.
+
+The goal is to find out more about your partner by asking questions. Try to ask “Why?” as much as possible. Your partner will tell you about his or her ideal pet, but you are really finding out more about your partner’s likes and dislikes. When we design, we create real things for real people. So we need to start with understanding them first.
+
+**5 minutes:** Review your notes, and circle anything that seems as if it will be important to understanding how to create the ideal pet for your partner. Circle ideas, advice, anything that could be helpful when you start building. Then, you should use what you have discovered about your partner to fill in the blanks:
+
+"My partner needs a `__________________` because `__________________`."
+
+This definition statement should draw some conclusions about your partner's need based on the conversation you have had with that person.
+
+**5 minutes:** Sketch at least 5 ideas of pets that would meet your partner's needs. Stick figures and diagrams are okay. At this point, quantity is more important than quality. You shouldn't limit yourself to real animals; unicorns and mashups are totally fine!
+
+Make sure you keep your notes and sketches! You will use them in the project for this lesson.
+
+## Examples
+
+![Design thinking sketch 1](/static/courses/csintro/making/dt-sketch1.jpg)
+
+![Design thinking sketch 2](/static/courses/csintro/making/dt-sketch2.jpg)
+
+![Design thinking sketch 3](/static/courses/csintro/making/dt-sketch3.jpg)
+
+![Design thinking sketch 4](/static/courses/csintro/making/dt-sketch4.jpg)
+
diff --git a/docs/test/courses/csintro/making/project.md b/docs/test/courses/csintro/making/project.md
index 7f124e2b637..38adc5a7a0f 100644
--- a/docs/test/courses/csintro/making/project.md
+++ b/docs/test/courses/csintro/making/project.md
@@ -2,9 +2,9 @@
## Project
-This project is an opportunity for students to create a micro:pet for the partner they interviewed in the Unplugged activity. They should review their notes and try to summarize what their partner finds appealing in a pet. Then, they should use whatever materials are available to create a prototype of a pet their partner would like.
+This project is an opportunity for you to create a micro:pet for the partner you interviewed in the Unplugged activity. You should review your notes and try to summarize what your partner finds appealing in a pet. Then, you should use whatever materials are available to create a prototype of a pet your partner would like.
-We often ask students to sketch a few designs on paper first, then consult with their partner to see which aspects of those designs they find most appealing. The purpose of prototyping is to gather more feedback to help you in your final design (“I like this part from Idea A, and I like this part from Idea B…”)
+It might make sense to sketch a few designs on paper first, then consult with your partner to see which aspects of those designs they find most appealing. The purpose of prototyping is to gather more feedback to help you in your final design (“I like this part from Idea A, and I like this part from Idea B…”)
Build a micro:pet that:
* Matches your partner’s needs
@@ -14,6 +14,7 @@ Build a micro:pet that:
Your design should use whatever materials are available to support the micro:bit so that its face is showing. You can be creative and decide how to mount the board, and how to decorate your critter.
Think about the following questions when you construct it:
+
* Will it be an animal? A plant? A robot? A bug?
* Will it have any moving parts?
* If it moves, how can you hold the micro:bit securely?
@@ -27,22 +28,15 @@ Some photos of sample micro:pets below!
* Create a way to carry your animal.
* Create an animal that reacts when you pet it or move it (find a way to detect when the micro:bit is moved or when its position changes in a certain way.)
-## Reflection
-Have students write a reflection of about 150–300 words, addressing the following points:
-* Summarize the feedback you got from your partner on your idea. How would you revise your design, if you were to go back and create another version?
-* What was it like to have someone designing a pet for you? Was it a pet you would have enjoyed? Why or why not? What advice did you give them that might help them redesign?
-* What was it like to interview your partner? What was it like to be listened to?
+## Journal Entry
+After you'cve completed your project, take some time to write in your design journal! You might write about soem of the following:
+
+* What feedback did you get from your partner on your idea? How would you revise your design, if you were to go back and create another version?
+* What was it like to design a pet for someone else? Was it a pet they would have enjoyed? Why or why not? What advice did they give you that might help you redesign?
+* What was it like to interview your partner? What was it like to have to take the time to purposely listen to someone else?
* What was something that was surprising to you about the process of designing the micro:pet?
* Describe a difficult point in the process of designing the micro:pet, and explain how you resolved it.
-## Rubric
-For creative projects such as these, we normally don’t use a qualitative rubric to grade the creativity or the match with their partner’s needs. We just check to make sure that the micro:pet meets the required specifications:
-* Program properly downloaded to micro:bit
-* micro:bit supported so the face is showing
-* micro:bit can be turned on and off without taking critter apart
-* Turned in notes on interview process
-* Written reflection (prompt is above)
-
## micro:pet Examples
![A dog micro:pet](/static/courses/csintro/making/micropet-dog.jpg)
diff --git a/docs/test/courses/csintro/radio.md b/docs/test/courses/csintro/radio.md
index ceec0f93dd5..ddeff648a1d 100644
--- a/docs/test/courses/csintro/radio.md
+++ b/docs/test/courses/csintro/radio.md
@@ -2,18 +2,19 @@
![Combo Box Example](/static/courses/csintro/radio/combo-box.png)
-This lesson covers the use of more than one micro:bit to share and combine data. Students will explore a complex epidemiological program (Infection) that demonstrates the Radio functionality of the micro:bit. Students will send and receive numbers and strings in a series of guided activities. Finally, students are asked to collaborate so that they can share their micro:bits and create a project together.
+This lesson covers the use of more than one micro:bit to share and combine data. You will send and receive numbers and strings in a series of guided activities, then create a project that makes use of the micro:bit's powerful Radio blocks.
+
+**Please note that this lesson is centered around the micro:bit's communication capabilities, so testing the code in this lesson will require two micro:bits.**
## Lesson objectives
-Students will...
+You will...
* Understand how to use the Radio blocks to send and receive data between micro:bits
* Understand the specific types of data that can be sent over the Radio
## Lesson structure
* Introduction: Radio & communication
-* Unplugged Activity: Infection simulation
* micro:bit Activity: Marco Polo & Morse Code
* Project: Radio
* Assessment: Rubric
@@ -22,13 +23,8 @@ Students will...
## Lesson plan
1. [**Overview**: Radio and communications](/test/courses/csintro/radio/overview)
-2. [**Unplugged**: Infection simulation](/test/courses/csintro/radio/unplugged)
-3. [**Activity**: Marco Polo and Morse code](/test/courses/csintro/radio/activity)
-4. [**Project**: Radio project](/test/courses/csintro/radio/project)
-
-## Flipgrid
-
-The [Flipgrid](https://info.flipgrid.com/) topic for the **Radio** lesson: https://flipgrid.com/eb9af729
+2. [**Activity**: Marco Polo and Morse code](/test/courses/csintro/radio/activity)
+3. [**Project**: Radio project](/test/courses/csintro/radio/project)
## Related standards
diff --git a/docs/test/courses/csintro/radio/activity.md b/docs/test/courses/csintro/radio/activity.md
index 4d9d1e67c32..58759f25190 100644
--- a/docs/test/courses/csintro/radio/activity.md
+++ b/docs/test/courses/csintro/radio/activity.md
@@ -1,32 +1,30 @@
-# Activity: Marco Polo and Morse code
+# Coding Activity 1: Marco Polo
![Marco Polo Cartoon](/static/courses/csintro/radio/marco-polo.png)
-Guide the students in creating programs that use the radio communication blocks to send and receive data between two micro:bits.
+Marco Polo was the first Westerner to journey to Eastern Asia and document his travels. There is an American game called “Marco Polo”, which is a form of call-and-response tag played in a swimming pool. One person closes their eyes and calls “Marco,” and the other players must respond “Polo.” Using the sound of their voices only, the Marco player must find and tag the Polo players.
-Notes:
-* When using the radio blocks, the micro:bit simulator will show two micro:bits
-* In the simulator, a radio transmission icon will appear in the top right corner of the micro:bit. The icon will light up as the micro:bit is transmitting data.
-* In the simulator, all the code in the coding workspace runs on both virtual micro:bits. You should include for how to send data as well as what to do when it receives data.
+We will be playing a form of this “Marco Polo” game using the radio on the micro:bits.
-## Marco Polo
-Send and receive strings between micro:bits.
-On button A pressed, we will send the string Marco and on button B pressed we will send the string Polo.
+This activity focuses on using Radio blocks to send and receive strings between micro:bits.
-* When communicating between micro:bits, it is important that the micro:bits involved are all using the same group ID. So, the first thing we will do is set the group ID number.
-* From the Radio menu, drag a 'radio set group' block to the coding workspace and place the block into the on start block.
-* In the 'radio set group block', leave the default value of 1 for the group ID
+## Set Group ID Number
+
+When communicating between micro:bits, it is important that the micro:bits involved are all using the same group ID. So, the first thing we will do is set the group ID number.
+
+* In Microsoft MakeCode, start a new project and name it: **Marco Polo**. Either delete the ‘forever’ block in the coding Workspace or move it to the side, as it’s not used in the activity.
+* Then from the Radio Toolbox, drag a **‘radio set group’** block to the coding Workspace and connect into the ‘on start’ block. In the **‘radio set group’** block, leave the default value of 1 for the group ID.
```blocks
radio.setGroup(1)
```
-* Drag 2 'on button pressed' blocks to the coding workspace
-* Leave one with the default value A and change the other button to B
-* From the Radio Toolbox drawer, drag 2 'radio send string' blocks to the coding workspace
-* Place one 'radio send string' block into the 'on button A pressed' block, and the other'radio send string' block into the 'on button B pressed' block
-* In the 'on button A pressed' block, change the default empty string value of the 'radio send string' block to the string "Marco"
-* In the 'on button B pressed' block, change the default empty string value of the 'radio send string' block to the string "Polo"
+## Code radio send for button A and button B
+
+* Drag two **‘on button pressed’** blocks to the coding Workspace. Leave one with the default value A , and use the dropdown menu to change the other button to B.
+* From the Radio Toolbox drawer, drag two **‘radio send string’** blocks to the coding Workspace. Place one **‘radio send string’** block into the **‘on button A pressed’** block, and the other **’radio send string’** block into the ‘on button B pressed’ block. Then:
+ * In the **‘on button A pressed’** block, change the default empty string value of the **‘radio send string’** block by typing the string: Marco
+ * In the **‘on button B pressed’** block, change the default empty string value of the **‘radio send string’** block by typing the string: Polo
```blocks
input.onButtonPressed(Button.A, () => {
@@ -36,9 +34,16 @@ input.onButtonPressed(Button.B, () => {
radio.sendString("Polo")
})
```
-* To display the data sent between the micro:bits, drag an 'on radio received receivedString' block to the coding workspace
-* From the Basic Toolbox drawer, drag a 'show string' block into the 'on radio received receivedString' block
-* From the 'on radio received receivedString' block, drag the 'receivedString' variable block into the default string value of "Hello" in the 'show string' block
+
+## Code radio received
+
+* To display the data sent between the micro:bits, drag an **‘on radio received (receivedString)’** block to the coding Workspace
+
+**Note:** There are a lot of blocks in the Radio category that look similar. Make sure you use the **‘on radio received’** block with **‘receivedString’** value.
+
+* From the Basic Toolbox drawer, drag a **‘show string’** block into the **‘on radio received (receivedString)’** block. Then from the Variables Toolbox drawer, drag a **‘receivedString’** variable block to replace the default string value of “Hello” in the **‘show string’** block.
+
+## Complete program
Here is the complete Marco Polo program:
@@ -55,9 +60,12 @@ input.onButtonPressed(Button.B, () => {
radio.setGroup(1)
```
-## Mods
+Solution link: [makecode.microbit.org/_5gs2WR1fM8uy]()
+
+## Mod this!
+
* Add a 'show leds' block to the 'on start' block. We created an image of the initials MP.
-* From the Music Toolbox drawer, drag 2 'play tone' blocks to the coding workspace. See [hack your headphones](/projects/hack-your-headphones) for how to connect a speaker or headphones to the micro:bit.
+* From the Music Toolbox drawer, drag 2 'play tone' blocks to the coding workspace.
* Drag one of the 'play tone' blocks to the 'on button A pressed' block, and the other one to the 'on button B pressed' block.
* Change the default value in the 'play tone' block that is inside the 'on button A pressed' block to the value Low C.
@@ -85,29 +93,41 @@ basic.showLeds(`
`)
```
-## Morse Code
+Solution link: [makecode.microbit.org/_7VrHLecATUzR]()
-Send and receive numbers between micro:bits.
-Depending on the button pressed, send a different number value between micro:bits. On receiving a number, display a different image unique to the number sent. One number will represent a dot, another a dash and another a space or stop.
+# Coding activity 2: Morse Code
+
+Morse code is a character encoding scheme used in telecommunication that encodes text characters as standardized sequences of two different signal durations called dots and dashes. Morse code is named for Samuel F. B. Morse, an inventor of the telegraph. The first versions were invented in the early 1800s and has been refined since then. In the late 1800s, it was used for early radio communication before it was possible to transmit voice.
![Morse code alphabet](/static/courses/csintro/radio/morse.png)
-* Set the group ID number.
-* Add a 'show string' block to the 'on start' block, to identify the program.
-* We choose to change the default string value of "Hello" to the value "Morse Code"
+This activity focuses on using Radio blocks to send and receive numbers between micro:bits:
+
+* Depending on the button pressed, a different number value is sent between micro:bits.
+
+* On receiving a number, the micro:bit will display a different image unique to the number sent.
+
+* One number will represent a dot, another a dash, and another a space or stop.
+
+## Set the group ID
+
+* In Microsoft MakeCode, start a new project and name it: **Morse code**. Either delete the ‘forever’ block in the coding Workspace or move it to the side, as it’s not used in the activity.
+
+* Set the Radio group ID number, following the same steps as the previous activity. Then add a **‘show string’** block to the **‘on start’** block to identify the program. In this example, the default string value of **Hello** is changed to the value **Morse Code**.
```blocks
radio.setGroup(1)
basic.showString("Morse Code")
```
-* Drag 3 'on button pressed' blocks to the coding workspace.
-* Leave one with the default value A, change the value in the second block to B, and change the value in the third block to A+B.
-* From the Radio Toolbox drawer, drag 3 'radio send number' blocks to the coding workspace.
-* Place one radio send number block into each of the 'on button pressed' blocks.
-* In the 'on button A pressed' block, leave the default number value of the 'radio send number' block as 0.
-* In the 'on button B pressed' block, change the default number value of the 'radio send number' block to the value 1.
-* In the 'on button A+B pressed' block, change the default number value of the 'radio send number' block to the value 2.
+## Code the buttons
+
+* Drag three **‘on button pressed’** blocks to the coding workspace. Leave one with the default value A, change the value in the second block to **B**, and change the value in the third block to **A+B**.
+
+* From the Radio Toolbox drawer, drag three **‘radio send number’** blocks to the coding workspace and place one **‘radio send number’** block into each of the **‘on button pressed’** blocks.
+ * In the **‘on button A pressed’** block, leave the default number value of the **‘radio send number’** block as 0.
+ * In the **‘on button B pressed’** block, change the default number value of the **‘radio send number’** block to the value 1.
+ * In the **‘on button A+B pressed’** block, change the default number value of the **‘radio send number’** block to the value 2.
```blocks
input.onButtonPressed(Button.A, () => {
@@ -121,16 +141,19 @@ input.onButtonPressed(Button.AB, () => {
})
```
-* From the Radio Toolbox drawer, drag an 'on radio received receivedNumber' event handler to the coding workspace.
-* Since we will display a different image depending on the number value received, we need a logic block.
-* From the Logic Toolbox drawer, drag an 'if...then' block to the coding workspace and place it in the 'on radio received receivedNumber' event handler.
+## Code radio received
+
+* From the Radio Toolbox drawer, drag an ‘on radio received (receivedNumber)’ event handler to the coding Workspace.
+
+**Note:** There are a lot of blocks in the Radio category that look similar. Make sure you use the block with the **‘receivedNumber’** value.
+
+* Since we will display a different image depending on the number value received, we need a logic block. From the Logic Toolbox drawer, drag an ‘if…then…else’ block to the coding Workspace and place it in the ‘on radio received (receivedNumber)’ event handler.
In order to know whether to display a dot, a dash, or a space/stop image, we need to compare the number received to the values 0, 1, and 2.
-* From the Logic Toolbox drawer, drag a 0=0 comparison block into the coding workspace.
-* Replace the default value 'true' of the 'if...then' block with the comparison block.
-* From the 'on radio received receivedNumber' block, pull down the 'receivedNumber' variable block and drop it into the first slot of the comparison block
-* Leave the righthand side default value of zero in the 0=0 block.
+* From the Logic Toolbox drawer, drag a **‘0=0’** comparison hexagon block onto the coding Workspace and drop it into the **‘if…then’** block replacing the default value of **“true”**.
+
+* From the Variables Toolbox drawer, drag a **‘receivedNumber’** variable block onto the coding Workspace and drop it into the first slot of the equals comparison block. Leave the default value of 0 in the second slot.
```blocks
radio.onReceivedNumber(function (receivedNumber) {
@@ -140,8 +163,7 @@ radio.onReceivedNumber(function (receivedNumber) {
})
```
-* Place a 'show leds' block in the space after the then of the 'if...then' block.
-* Create an image to represent a dot.
+* From the Basic Toolbox, drag a ‘show leds’ block to the coding Workspace and drop it under the ‘if…then’ clause. Then create an image to represent a dot.
```blocks
radio.onReceivedNumber(function (receivedNumber) {
@@ -158,13 +180,11 @@ radio.onReceivedNumber(function (receivedNumber) {
```
### Try it!
-* Download your program to the micro:bit
-* Press button A on the sending micro:bit
-* Does this cause a dot to be displayed on the receiving micro:bit?
-* However, pressing button A again does not appear to send another dot as the image on the receiving micro:bit does not appear to change.
+Download the program to the micro:bit and press button A on the sending micro:bit. Does this cause a dot to be displayed on the receiving micro:bit?
+
+However, pressing button A again does not appear to send another dot as the image on the receiving micro:bit does not appear to change.
-Challenge question: How can we fix this?
-* Add a 'pause' block and a 'clear screen' block after the 'show leds' block
+**Challenge question:** How can we fix this? **Answer:** Add a ‘pause’ block and a ‘clear screen’ block after the ‘show leds’ block.
```blocks
radio.onReceivedNumber(function (receivedNumber) {
@@ -181,19 +201,24 @@ radio.onReceivedNumber(function (receivedNumber) {
}
})
```
-Try running the program again.
-Now each time the sender presses button A, you see a dot appear.
+Try running the program again.
+Now, each time the sender presses button A, you see a dot appear.
![micro:bit dot display](/static/courses/csintro/radio/microbit-dot-display.png)
-* You can now right-click on the 'if…then' block and select Duplicate to copy that piece of code twice for the other 2 values that a sender may send.
+## Code the other received images
-![If-block, right-click and duplicate](/static/courses/csintro/radio/if-then-duplicate.png)
+Now we need to specify what to display if we receive a 1 or 2.
-* Change the values on the righthand side of the comparison block to 1, and 2.
-* Modify the images displayed to show a dash, and a full screen of lights
+* In the **‘if…then…else’** block, select the plus (+) icon to create an **‘else if’** clause.
+* Right-click on the equals comparison block in the ‘if’ clause and select Duplicate to create a copy.
+* Then, drag this new equals comparison block into the ‘else if’ clause.
+* Change the value in the second slot of the equals comparison block from 0 to 1. We don’t have to test **‘receivedNumber’** value in the third **‘else’** clause—if the value is not 0 or 1, then it must be 2, since there are only three possibilities.
+* From the Basic Toolbox drawer, drag **‘show leds’**, **‘pause’**, and **‘clear screen’** blocks to the **‘else if’** and **‘else’** clauses. Then, modify the **‘show leds’** images displayed:
+ * For the **‘else if (receivedNumber=1)’**, show a dash.
+ * For the **‘else’** clause (which is when the **‘receivedNumber’** variable equals 2), show a full screen of lights.
-### Morse code program
+## Complete program
```blocks
@@ -244,32 +269,25 @@ input.onButtonPressed(Button.AB, () => {
radio.setGroup(1)
basic.showString("Morse Code")
```
+Solution link: [makecode.microbit.org/_846Kyk4619yh]()
-### Try it!
-* Download your program to the micro:bit
-* Press buttons A, B, and A+B together on the micro:bit
+## Try it!
-Challenge question: Can our code be made more efficient?
-* Whenever you look over a program and see the same lines of code repeated, there is usually a chance to improve the code making it more efficient by reducing the number of lines of code
-* What lines are repeated in our program? If...then, pause, clear screen
-* Can we edit the code to use only one 'if...then' block, one 'pause' block, and one 'clear screen' block? Yes!
+Download your program to the micro:bit. Press buttons A, B, and A+B together on the sending micro:bit to see the associated image on the receiving micro:bit.
-## Making our code more efficient
+## Mod this!
-Remind students that they can edit the 'if...then' block, adding as many 'else if' conditions as needed.
-They can do this by clicking on the **(+)** or **(-)** symbols on the 'if...then' block.
+**A final else**
-![Add else-if to if-then block](/static/courses/csintro/radio/if-then-else-if.png)
+In a conditional that might receive a number of different values, it is good coding practice to have a catch-all ‘else’ clause. In the example, if any number value other than the ones we coded for (0,1, and 2) is received, we can signal the user that an error has occurred by using a ‘show icon’ block to display an X.
-A final else
-In a conditional that might receive a number of different values, it is good coding practice to have a catch-all 'else' clause. In our example, if any number value other than the ones we coded for (0,1, and 2) is received, we can signal the user that an error has occurred by using a 'show icon' block to display an X.
+**The pause and clear screen**
-The pause and clear screen
-Rather than repeat these lines of code 3 times, we can move the 'pause' block and the 'clear screen' block outside of the edited 'if...then…else' block.
+* Rather than repeat these lines of code three times, we can move the **‘pause’** block and the **‘clear screen’** block outside of the edited **‘if…then…else’** block and inside the **‘on radio received (receivedNumber)’** block.
-Now our program runs as we designed it to run and is more efficient, too!
+Now our program runs as we designed it to run and is more efficient, too! Download the revised program to the micro:bits and test it out.
-Final Morse Code Program:
+### Complete program with mod
```blocks
input.onButtonPressed(Button.A, () => {
@@ -318,4 +336,22 @@ basic.showString("Morse Code")
```package
radio
-```
\ No newline at end of file
+```
+
+Solution link: [makecode.microbit.org/_fWpDXK1hFFC9]()
+
+## Knowledge Check
+
+**Questions:**
+
+1. Using the radio blocks, what information can you send to a micro:bit?
+2. Why did we all have to set our ‘radio set group’ block to a default value of 1?
+3. Why was it important to set a final catch-all ‘else’ clause in the conditional you used for the Morse code activity?
+4. When editing code, why do we look for lines of code that repeat?
+
+**Answers:**
+
+1. You can send a number, a string, or a string/number combination. You can also give a micro:bit instructions on what to do when it receives a radio message.
+2. So that the micro:bits would all be using the same group ID number and could send and receive messages.
+3. So that it would display an error message if it received a number value beyond 0, 1, or 2.
+4. To make code more efficient and to reduce the number of lines of code needed.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/radio/overview.md b/docs/test/courses/csintro/radio/overview.md
index 7689ed8b906..608bb803450 100644
--- a/docs/test/courses/csintro/radio/overview.md
+++ b/docs/test/courses/csintro/radio/overview.md
@@ -1,19 +1,13 @@
# Introduction
-Up to this point, we have been primarily challenging students to collaborate while they create their own projects. This lesson, on communication using the micro:bit radio, is a great opportunity to have students work in pairs on a project. Have kids find a partner to work with for this lesson, and make sure they are seated next to each other.
-
-Note: Many teachers find the concept of “pair programming” to be a valuable way to have students collaborate when programming. Two students share one computer, with one student at the keyboard acting as the driver, and the other student providing directions as the navigator. Students must practice good communication with each other throughout the entire programming process.
-
The micro:bit allows you to communicate with other micro:bits in the area using the blocks in the Radio category. You can send a number, a string (a word or series of characters) or a string/number combination in a radio packet. You can also give a micro:bit instructions on what to do when it receives a radio packet.
-## ~ hint
-
-Watch this video to see how the radio hardware works on the @boardname@:
+## Bonus
-https://www.youtube.com/watch?v=Re3H2ISfQE8
+Watch this video to see how the radio hardware works on the micro:bit:
-## ~
+[https://www.youtube.com/watch?v=Re3H2ISfQE8]()
-This lesson starts with a “plugged” unplugged activity, in which students use their micro:bits to explore an advanced simulation. The code is quite complex, so students will focus more on how to use the micro:bits to explore aspects of viruses and epidemics, than the intricacies of the code itself.
+##
-The project for this lesson will challenge students to work together to send and receive some sort of data to and from each other. There is a wide range of simple and complex projects kids can try, but whatever they choose it is a whole lot of fun to communicate with each other using the micro:bits!
+The project for this lesson will challenge you to send and receive some sort of data to and from a pair of micro:bits. There is a wide range of simple and complex projects you can try, but whatever you choose, it is a whole lot of fun to communicate using the micro:bits!
\ No newline at end of file
diff --git a/docs/test/courses/csintro/radio/project.md b/docs/test/courses/csintro/radio/project.md
index 35832342369..b312869c501 100644
--- a/docs/test/courses/csintro/radio/project.md
+++ b/docs/test/courses/csintro/radio/project.md
@@ -1,8 +1,6 @@
# Project: Radio project
-For this project, students should work in pairs to design a project that incorporates radio communication to send and receive data in some way. Some projects may have two separate programs: One that receives data, and one that sends data. Students might each choose to submit one program in that case.
-
-In other cases, a pair of students might submit one program that has both sending and receiving code in it, and the same code is uploaded to two or more micro:bits.
+For this project, you'll be coding two micro:bits and making use of the Radio blocks to send and receive data between them. Some projects may even have two separate programs: One that receives data, and one that sends data.
## Project Ideas
@@ -18,18 +16,20 @@ This is a simple three-note keyboard that uses wooden paint stirrers and copper
![Keyboard with copper tape](/static/courses/csintro/radio/keyboard-copper-tape.png)
Keyboard with copper tape connections
-When a key is pressed, it sends a number over the radio to a second micro:bit that plays the appropriate tone over a set of earbuds. This allows you to use each of the three pins on the first micro:bit to play a different tone.
+When a key is pressed, it sends a number over the radio to a second micro:bit that plays the appropriate tone. This allows you to use each of the three pins on the first micro:bit to play a different tone.
![Second micro:bit that plays notes](/static/courses/csintro/radio/microbit-number-two.png)
Second micro:bit that plays the notes
-#### ~ hint
+### ~ hint
+
+#### Bonus
-This project uses touch pin inputs. See how the @boardname@ detects a press at a pin or on something connected to a pin in this video:
+This project uses touch pin inputs. See how the micro:bit detects a press at a pin or on something connected to a pin in this video:
https://www.youtube.com/watch?v=GEpZrvbsO7o
-#### ~
+### ~
#### 3-Note keyboard program
@@ -96,6 +96,8 @@ basic.showLeds(`
basic.clearScreen()
```
+Solution link: [makecode.microbit.org/_iXKbWu8f2H60]()
+
### Radio tennis
In this project, the tennis racquets alternate displaying a ball on the micro:bit LED screen. When you swing the racquet, the ball disappears from one micro:bit display and shows up on the other micro:bit's display.
@@ -104,41 +106,13 @@ Radio Tennis racquets (made from cardboard)
## Reflection
-Have students write a reflection of about 150–300 words, addressing the following points:
-* What kind of Project did you do? How did you decide what to pick?
+Write a short reflection of about 150–300 words, addressing the following points:
+
+* What kind of project did you do? How did you decide what to pick?
* How does your project use radio communication?
-* Are there separate programs for the Sender and the Receiver micro:bits? Or 1 program for both?
+* Are there separate programs for the Sender and the Receiver micro:bits? Or one program for both?
* Describe something in your project that you are proud of.
-* Describe a difficult point in the process of designing this program, and explain how you resolved it.
-* What feedback did your beta testers give you? How did that help you improve your design?
-
-## Assessment
-
-**Competency scores**: 4, 3, 2, 1
-
-### Radio
-
-**4 =** Effectively uses the Radio to send and receive data, with meaningful actions and responses for each.
-**3 =** Effectively uses the Radio to send or receive data, with meaningful actions and responses for each.
-**2 =** Use of Radio is incomplete or non-functional and/or tangential to operation of program.
-**1 =** No working and/or meaningful use of Radio.
-
-### micro:bit program
-**4 =** micro:bit program:
-`*` Uses Radio blocks in a way that is integral to the program
-`*` Compiles and runs as intended
-`*` Meaningful comments in code
-**3 =** micro:bit program lacks 1 of the required elements.
-**2 =** micro:bit program lacks 2 of the required elements.
-**1 =** micro:bit program lacks all of the required elements.
-
-### Collaboration reflection
-
-**4 =** Reflection piece addresses all prompts.
-**3 =** Reflection piece lacks 1 of the required elements.
-**2 =** Reflection piece lacks 2 of the required elements.
-**1 =** Reflection piece lacks 3 of the required elements.
-
-```package
-radio
-```
\ No newline at end of file
+* Describe a difficult point in the process of designing this program and explain how you resolved it.
+* What feedback did your testers give you? How did that help you improve your design?
+* How would you improve your project, given more time?
+* Publish your MakeCode program and include the link.
\ No newline at end of file
diff --git a/docs/test/courses/csintro/variables.md b/docs/test/courses/csintro/variables.md
index e198ed34396..bca4e0cc2c5 100644
--- a/docs/test/courses/csintro/variables.md
+++ b/docs/test/courses/csintro/variables.md
@@ -18,10 +18,10 @@ You will...
## Lesson plan
-1. [**Overview**: Variables in Daily Life](/test/courses/csintro/variables/overview)
-2. [**Activity**: Make a Game Scorekeeper](/test/courses/csintro/variables/activity)
-3. [**Project**: Everything Counts](/test/courses/csintro/variables/project)
+1. [**Overview**: Variables in Daily Life](test/courses/csintro/variables/overview)
+2. [**Activity**: Make a Game Scorekeeper](test/courses/csintro/variables/activity)
+3. [**Project**: Everything Counts](test/courses/csintro/variables/project)
## Related standards
-[Targeted CSTA standards](/test/courses/csintro/variables/standards)
\ No newline at end of file
+[Targeted CSTA standards](test/courses/csintro/variables/standards)
\ No newline at end of file
diff --git a/docs/test/courses/csintro/variables/activity.md b/docs/test/courses/csintro/variables/activity.md
index 13af0f7c079..cce957aee56 100644
--- a/docs/test/courses/csintro/variables/activity.md
+++ b/docs/test/courses/csintro/variables/activity.md
@@ -16,8 +16,7 @@ In MakeCode, from the Variables menu, make and name these three variables: `Play
![Set new variable name](/static/courses/csintro/variables/new-variable.png)
-## Initializing the variable value
-
+## Initializing the variable value
It is important to give your variables an initial value. The initial value is the value the variable will hold each time the program starts. For our counter program, we will give each variable the value 0 (zero) at the start of the program.
```blocks
@@ -71,7 +70,6 @@ input.onButtonPressed(Button.AB, () => {
PlayersTie += 1
})
```
-
## User feedback
Whenever the scorekeeper presses button A, button B, or both buttons together, we will give the user visual feedback acknowledging that the user pressed a button. We can do this by coding our program to display:
@@ -204,6 +202,8 @@ PlayersTie = 0
### ~ hint
+#### History of buttons
+
Buttons have been used as human input devices since computers first existed. Watch this video and see how they let the user tell the micro:bit to do something.
[https://www.youtube.com/watch?v=t_Qujjd_38o](https://www.youtube.com/watch?v=t_Qujjd_38o)
@@ -214,7 +214,7 @@ Buttons have been used as human input devices since computers first existed. Wat
Download the Scorekeeper program to the micro:bit, and find someone to play *Rock, Paper, Scissors* with you using your micro:bit to act as the Scorekeeper!
-## 'Adding' on with mathematical operations
+## ‘Adding’ on with mathematical operations
There is more we can do with the input we received using this program. We can use mathematical operations on our variables.
@@ -232,7 +232,6 @@ In order to do this, we can add the code to our program under the 'on shake' eve
![Operator selector](/static/courses/csintro/variables/operator-selector.png)
* Replace the default values of zero with the names of the variables we want to add together.
-
Notice that because we are adding three variables together we need a second math block. First we add the values for `PlayerAWins` and `PlayerBWins`, then add `PlayersTie`.
```blocks
@@ -261,7 +260,9 @@ Examples:
Questions:
1. What's the difference between a constant and a variable?
+
2. Why is it important to name variables in a clear and meaningful way?
+
3. **True or false:** You can only use the default variable names provided in the Variables toolbox drawer.
Answers:
diff --git a/docs/test/static/courses/csintro/accelerometer/accelerometer.png b/docs/test/static/courses/csintro/accelerometer/accelerometer.png
new file mode 100644
index 00000000000..34fe6bc36b8
Binary files /dev/null and b/docs/test/static/courses/csintro/accelerometer/accelerometer.png differ
diff --git a/docs/test/static/courses/csintro/accelerometer/axes.png b/docs/test/static/courses/csintro/accelerometer/axes.png
new file mode 100644
index 00000000000..69e3d3e45a3
Binary files /dev/null and b/docs/test/static/courses/csintro/accelerometer/axes.png differ
diff --git a/docs/test/static/courses/csintro/accelerometer/bit.png b/docs/test/static/courses/csintro/accelerometer/bit.png
new file mode 100644
index 00000000000..9879ab593d4
Binary files /dev/null and b/docs/test/static/courses/csintro/accelerometer/bit.png differ
diff --git a/docs/test/static/courses/csintro/accelerometer/global.png b/docs/test/static/courses/csintro/accelerometer/global.png
new file mode 100644
index 00000000000..191dc1225ea
Binary files /dev/null and b/docs/test/static/courses/csintro/accelerometer/global.png differ
diff --git a/docs/test/static/courses/csintro/accelerometer/highvelocitylowaccel.png b/docs/test/static/courses/csintro/accelerometer/highvelocitylowaccel.png
new file mode 100644
index 00000000000..42b4c753af0
Binary files /dev/null and b/docs/test/static/courses/csintro/accelerometer/highvelocitylowaccel.png differ
diff --git a/docs/test/static/courses/csintro/accelerometer/lowvelocityhighaccel.png b/docs/test/static/courses/csintro/accelerometer/lowvelocityhighaccel.png
new file mode 100644
index 00000000000..8512508d714
Binary files /dev/null and b/docs/test/static/courses/csintro/accelerometer/lowvelocityhighaccel.png differ
diff --git a/docs/test/static/courses/csintro/accelerometer/shake.jpeg b/docs/test/static/courses/csintro/accelerometer/shake.jpeg
new file mode 100644
index 00000000000..708a3ce41e6
Binary files /dev/null and b/docs/test/static/courses/csintro/accelerometer/shake.jpeg differ
diff --git a/docs/test/static/courses/csintro/accelerometer/velocity.png b/docs/test/static/courses/csintro/accelerometer/velocity.png
new file mode 100644
index 00000000000..3bf6c05162f
Binary files /dev/null and b/docs/test/static/courses/csintro/accelerometer/velocity.png differ