close
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/blocks/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ input.onButtonPressed(Button.A, function () {
})
```

You know, of course, that the button press event means that the user has acknowleged your greeting. If you shared your program with someone else though, they might not understand why you wanted to add the button press to the program.
You know, of course, that the button press event means that the user has acknowledge your greeting. If you shared your program with someone else though, they might not understand why you wanted to add the button press to the program.

## Block comments

Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/pause-until.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Sometimes you need to wait in one part of a program for something to happen some
## Parameters

* **condition**: a [boolean](/types/boolean) condition that restarts the program when it becomes ``true``.
* **timeOut**: an optional paramenter which is a [number](/types/number) of milliseconds to wait for the **condition** to become ``true``. The pause ends when the timeout has elapsed even if **condition** is still ``false``.
* **timeOut**: an optional parameter which is a [number](/types/number) of milliseconds to wait for the **condition** to become ``true``. The pause ends when the timeout has elapsed even if **condition** is still ``false``.

### ~hint

Expand Down
2 changes: 1 addition & 1 deletion docs/courses/blocks-to-javascript/command-responder.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ radio.onReceivedString(function (receivedString) {
})
```

Find the **(+)** symbol on the ``||logic:if then||`` block and click it 4 times to make **3** ``||logic:else if||`` sections and **1** ``||logic:else||`` section. For each ``||logic:else if||`` condition, copy the condtion from ``||logic:if then||`` and put in the strings for the remaining 3 commands. Also, for each one, set ``response`` to the proper ``||input:Input||`` value. Finally, in the ``||logic:else||`` section, set ``response`` to `0` in case an unknown command is received.
Find the **(+)** symbol on the ``||logic:if then||`` block and click it 4 times to make **3** ``||logic:else if||`` sections and **1** ``||logic:else||`` section. For each ``||logic:else if||`` condition, copy the condition from ``||logic:if then||`` and put in the strings for the remaining 3 commands. Also, for each one, set ``response`` to the proper ``||input:Input||`` value. Finally, in the ``||logic:else||`` section, set ``response`` to `0` in case an unknown command is received.

```blocks
let response = 0
Expand Down
8 changes: 4 additions & 4 deletions docs/courses/blocks-to-javascript/complex-conditionals.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if (input.buttonIsPressed(Button.A) || input.buttonIsPressed(Button.B)) {
}
```

We can create the same conditional check as in the code above but with a different form. Changing the code slighlty, we can insert an ``||logic:else if||`` and put one of the button press conditons inside of it. This version checks for either button press like before but it needs another ``||basic:show icon||`` which adds more code.
We can create the same conditional check as in the code above but with a different form. Changing the code slightly, we can insert an ``||logic:else if||`` and put one of the button press conditions inside of it. This version checks for either button press like before but it needs another ``||basic:show icon||`` which adds more code.


```blocks
Expand All @@ -96,7 +96,7 @@ basic.forever(function () {

## Conditional expressions

Often you will need to set a boolean variable to remember the result of a conditional test. If we want to set a boolean variable called ``cold`` to `true` when the tempurature is less than `10` degress, we could do it using an ``||logic:if then else||`` block.
Often you will need to set a boolean variable to remember the result of a conditional test. If we want to set a boolean variable called ``cold`` to `true` when the temperature is less than `10` degrees, we could do it using an ``||logic:if then else||`` block.

```block
let cold = false
Expand Down Expand Up @@ -130,12 +130,12 @@ if (input.temperature() < 10) {
}
```

Now let's use the condtion in the ``||logic:if then else||`` block to set the string variable ``heatMessage`` directly. To do this we need to switch over to the JavaScript editor. Instead of using the result of the conditional expression to set the value of the variable, the expression will determine a value option for ``heatMessage``.
Now let's use the condition in the ``||logic:if then else||`` block to set the string variable ``heatMessage`` directly. To do this we need to switch over to the JavaScript editor. Instead of using the result of the conditional expression to set the value of the variable, the expression will determine a value option for ``heatMessage``.

To set the variable based on the result of the expression, the value options are placed right after the expression using a `?`. The the value option for a `true` result is stated first and then followed by a `:` with the value option for a `false` result after that. It looks like this:

```typescript
let heatMessage = input.temperature() < 10 ? "COLD" : "WARM"
```

The ``heatMeassage`` variable is set to the string saying ``"COLD"`` if the temperature is less than `10` degrees celsius or to ``"WARM"`` when it's `10` degrees or warmer.
The ``heatMessage`` variable is set to the string saying ``"COLD"`` if the temperature is less than `10` degrees celsius or to ``"WARM"`` when it's `10` degrees or warmer.
6 changes: 3 additions & 3 deletions docs/courses/blocks-to-javascript/conditional-loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Work with your conditional loop blocks in JavaScript and make them do more.

## ~

The conditional loops let you run some part of a program multiples times while some condtion remains true. In MakeCode these conditional loops are in the **[while](/blocks/loops/while)**, **[for](/blocks/loops/for)**, and **[repeat](/blocks/loops/repeat)** blocks:
The conditional loops let you run some part of a program multiples times while some condition remains true. In MakeCode these conditional loops are in the **[while](/blocks/loops/while)**, **[for](/blocks/loops/for)**, and **[repeat](/blocks/loops/repeat)** blocks:

```block
while (true) {}
Expand Down Expand Up @@ -43,7 +43,7 @@ One thing you may not have expected is that the ``||loops:repeat||`` block is ac

## While Loop

The ``||loops:while||`` loop is probably the simplist of the loops. It has just a single condition that, while true, causes the code inside the loop to continue to run. The loop here will show the number in the ``count`` variable on the screen until ``count`` reaches the value of `5`.
The ``||loops:while||`` loop is probably the simplest of the loops. It has just a single condition that, while true, causes the code inside the loop to continue to run. The loop here will show the number in the ``count`` variable on the screen until ``count`` reaches the value of `5`.


```block
Expand Down Expand Up @@ -113,7 +113,7 @@ for (let index = 4; index >= 0; index--) {
}
```

You'll now see in the simulator that the value displayed on the screen counts down from `4` to `0`. This form of the **for** loop is too complicatied for blocks so when you switch back to the Blocks editor the entire loop is shown in a grey block.
You'll now see in the simulator that the value displayed on the screen counts down from `4` to `0`. This form of the **for** loop is too complicated for blocks so when you switch back to the Blocks editor the entire loop is shown in a grey block.

```block-ignore
for (let index = 4; index >= 0; index--) {
Expand Down
2 changes: 1 addition & 1 deletion docs/courses/blocks-to-javascript/writing-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ You see that we used, or called, the function **showMyName** two times and didn'

You can see that a function is really useful when you want to reuse some code, especially if it's a lot of code! But wait, functions are even more powerful when you can send them some information to work with!

The **showMyName** function would really be awesome if it could display anyone's name. So, how can we make it do that? Well, let's use a _parameter_. A parameter is like a variable but it's a special variable only for the function. It allows your program to send, or _pass_, a value to the function. Just like a variable, the parameter has a [type](/types) for the value passed in it. To use a parmeter with a function, we need to work with its code in the JavaScript editor since using a parameter makes the function too complex to be a block.
The **showMyName** function would really be awesome if it could display anyone's name. So, how can we make it do that? Well, let's use a _parameter_. A parameter is like a variable but it's a special variable only for the function. It allows your program to send, or _pass_, a value to the function. Just like a variable, the parameter has a [type](/types) for the value passed in it. To use a parameter with a function, we need to work with its code in the JavaScript editor since using a parameter makes the function too complex to be a block.

Go over to the JavaScript editor and change the function's name from **showMyName** to just **showName**. Give it a parameter to display anyone's name by inserting ``name: string`` in between the `(` `)` after the function name.

Expand Down
2 changes: 1 addition & 1 deletion docs/courses/csintro-educator.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Any of the individual course material items are also available as a separate dow
### [Standards and assessments](https://onedrive.live.com/?authkey=%21ALunv1kXkaA0RLg&id=416406873CB120AB%21521&cid=416406873CB120AB)

* [Assessment guide](https://onedrive.live.com/view.aspx?cid=416406873cb120ab&page=view&resid=416406873CB120AB!528&parId=416406873CB120AB!521&authkey=!ALunv1kXkaA0RLg&app=Word)
* [Assesment guide (PDF)](https://onedrive.live.com/?authkey=%21ALunv1kXkaA0RLg&cid=416406873CB120AB&id=416406873CB120AB%213751&parId=416406873CB120AB%21521&o=OneUp)
* [Assessment guide (PDF)](https://onedrive.live.com/?authkey=%21ALunv1kXkaA0RLg&cid=416406873CB120AB&id=416406873CB120AB%213751&parId=416406873CB120AB%21521&o=OneUp)
* [Standards alignment guide](https://onedrive.live.com/view.aspx?cid=416406873cb120ab&page=view&resid=416406873CB120AB!527&parId=416406873CB120AB!521&authkey=!ALunv1kXkaA0RLg&app=Word)
* [Standards alignment guide (PDF)](https://onedrive.live.com/?authkey=%21ALunv1kXkaA0RLg&cid=416406873CB120AB&id=416406873CB120AB%213752&parId=416406873CB120AB%21521&o=OneUp)

Expand Down
6 changes: 3 additions & 3 deletions docs/courses/csintro-educator/preview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Educator materials preview

The materials are designed to allow educators to deliver a Computer Science curriculum to students in a structured format that introduces them to new concepts with engaging activites and projects. In addtion to the individual lesson materials, there are course guides, overviews, and assessment guides help the teacher along in presenting the course.
The materials are designed to allow educators to deliver a Computer Science curriculum to students in a structured format that introduces them to new concepts with engaging activities and projects. In addition to the individual lesson materials, there are course guides, overviews, and assessment guides help the teacher along in presenting the course.

These materials give the teacher who's new to the subject an already prepared lesson series which they can start to teach with right away. For educators that have wanted to introduce a Computer Science course into their classroom but have yet to develop the course material for one, use these materials and start teaching now!

Expand All @@ -12,13 +12,13 @@ Each lesson has classroom presentation slides that let you introduce students to

## Educator guides

Every lesson has a complete guide to describe the lesson goals, activities, and indended outcomes.
Every lesson has a complete guide to describe the lesson goals, activities, and intended outcomes.

![Example lesson page](/static/courses/csintro-educator/lesson-example.jpg)

## Student workbook

The student workbook is for the student to follow. It sets the lesson goals and clearly describes the making and coding activites.
The student workbook is for the student to follow. It sets the lesson goals and clearly describes the making and coding activities.

![Example student workbook page](/static/courses/csintro-educator/workbook-example.jpg)

Expand Down
2 changes: 1 addition & 1 deletion docs/courses/csintro/algorithms/unplugged.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unplugged: What's your function & crazy conditionals

This is a classroom activity that teachers might choose to run with a classrom of students.
This is a classroom activity that teachers might choose to run with a classroom of students.

Materials
* Pencils
Expand Down
2 changes: 1 addition & 1 deletion docs/courses/csintro/arrays/unplugged.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This activity asks you to carefully consider something that comes naturally to y
## Initial Sort

* 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.
* Place the pieces in numerical 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?
Expand Down
2 changes: 1 addition & 1 deletion docs/courses/csintro/making.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Making with micro:bit

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.
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 physical 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)

Expand Down
2 changes: 1 addition & 1 deletion docs/courses/csintro/making/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ _Pink Piggy_
![A ladybug micro:pet](/static/courses/csintro/making/micropet-ladybug.jpg)
_Ladybug_

![A caterpiller micro:pet](/static/courses/csintro/making/micropet-caterpillar.jpg)
![A caterpillar micro:pet](/static/courses/csintro/making/micropet-caterpillar.jpg)
_Caterpillar_

![A fox micro:pet](/static/courses/csintro/making/micropet-fox.jpg)
Expand Down
4 changes: 2 additions & 2 deletions docs/courses/logic-lab/elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Whether creating equations in Boolean algebra or using them in your programs, yo

## Notation

Boolean (logical) equations are expressed in a way similar to mathmatical equations. Variables in Boolean expressions though, have only two possible values, ``true`` or ``false``. For an equation using a logical expression, the equivalant sides of the equal sign ,``=``, will be only ``true`` or ``false`` too.
Boolean (logical) equations are expressed in a way similar to mathematical equations. Variables in Boolean expressions though, have only two possible values, ``true`` or ``false``. For an equation using a logical expression, the equivalent sides of the equal sign ,``=``, will be only ``true`` or ``false`` too.

The following list shows the basic notation elements for variables and operators in Boolean expressions:

Expand All @@ -24,7 +24,7 @@ An equation to show logically equivalent expressions (where both sides have the

## Logical operators

All Boolean expressions result from a combination of conditions and operators. These operators join individual conditons together and evaluate into a single ``true`` or ``false`` condition. The following are the basic logical operators. Their use in both Boolean algebra and in code is shown along with their truth table.
All Boolean expressions result from a combination of conditions and operators. These operators join individual conditions together and evaluate into a single ``true`` or ``false`` condition. The following are the basic logical operators. Their use in both Boolean algebra and in code is shown along with their truth table.

### Identity

Expand Down
10 changes: 5 additions & 5 deletions docs/courses/logic-lab/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ By taking some facts and putting them into a logical form, we can make an arithm

You see the AND, NOT, and OR in the example word equations? These are our logical _operators_. Every day we make decisions when we think about one or more facts together using these operators. Sometimes, it's necessary for all facts to be true in order for the conclusion to be true. This is the case when the AND operator is used. When analyzing facts with the OR operator, only one fact needs to be true for the conclusion to be true also.

Making a decision may require more than just one or two facts. When this happens, another operator is needed to combine the facts together to make a conclusion. In the last example word equation, you actually might not be floating if just those two condtions are true. To correctly prove that you're actually floating, you need to state that you're in water too.
Making a decision may require more than just one or two facts. When this happens, another operator is needed to combine the facts together to make a conclusion. In the last example word equation, you actually might not be floating if just those two conditions are true. To correctly prove that you're actually floating, you need to state that you're in water too.

* **(**``I can swim`` **OR** ``I'm in a boat``**) AND** ``I'm in water`` **=** ``I'm floating``

Expand Down Expand Up @@ -76,9 +76,9 @@ The logic equation now doesn't include the result variable ``Q`` but instead the

### ~ hint

#### De Morgan's Thereom
#### De Morgan's Theorem

That last equation, ``~(A · B)`` = ``~A + ~B``, demonstrates an inportant property in Boolean algebra. It's called De Morgan's Thereom which says that the inverse (NOT) of a conjunction (AND) is logically equivalent to the disjunction (OR) of two inverses (NOT). Also, the inverse (NOT) of a disjunction (OR) is logically equivalent to the conjunction (AND) of two inverses (NOT).
That last equation, ``~(A · B)`` = ``~A + ~B``, demonstrates an important property in Boolean algebra. It's called De Morgan's Theorem which says that the inverse (NOT) of a conjunction (AND) is logically equivalent to the disjunction (OR) of two inverses (NOT). Also, the inverse (NOT) of a disjunction (OR) is logically equivalent to the conjunction (AND) of two inverses (NOT).

This easier understood by seeing the Boolean equations for both cases:

Expand All @@ -92,7 +92,7 @@ This easier understood by seeing the Boolean equations for both cases:

## Truth tables

A truth table is a way to see all possible condtions for the variables in a logical expression and to chart the results. Using the truth statement about when it's freezing outside and you have no coat, here's the truth table showing the possible conditions and their results:
A truth table is a way to see all possible conditions for the variables in a logical expression and to chart the results. Using the truth statement about when it's freezing outside and you have no coat, here's the truth table showing the possible conditions and their results:

It's freezing | I have no coat | I feel cold
-|-|-
Expand Down Expand Up @@ -137,7 +137,7 @@ T | F | T
T | F | F
<br/>

To write a Boolean equation for when you feel cold, we find the condtions in the table where ``Q`` is ``true``. Here we see that you will feel cold only in one row, when condition ``A`` is ``true`` and condtion ``B`` is ``false``. The Boolean equation for these conditions is this:
To write a Boolean equation for when you feel cold, we find the conditions in the table where ``Q`` is ``true``. Here we see that you will feel cold only in one row, when condition ``A`` is ``true`` and condition ``B`` is ``false``. The Boolean equation for these conditions is this:

``A · ~B`` = ``Q``

Expand Down
Loading
Loading