Skip to content

Commit

Permalink
Merge branch 'master' into basic-file-manipulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Stojanovic authored Mar 15, 2023
2 parents 702753f + 380375e commit c9c00a4
Show file tree
Hide file tree
Showing 542 changed files with 15,773 additions and 1,046 deletions.
454 changes: 454 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Welcome to our open-source content repository! At Enki, we feel that education is a community effort, and is best approached when everyone is involved and engaged. To that end, we have an entirely open-source curriculum available for you to edit, comment on, and contribute to! **To get started, have a look at our [Wiki](https://github.com/enkidevs/curriculum/wiki)**.

Learning happens best in a psychologically safe environment, so we've adopted the [contributor covenant](https://www.contributor-covenant.org/) as our code of conduct. If a list of rules isn't helping you envision what we're after, [here's another great resource](https://www.recurse.com/manual#sec-environment) (from The Recurse Center, read the Social Rules section) for how to participate in creating a community you'd like to be a part of. We _will_ enforce this, please get in touch with [email protected] or stefan.stojanovic@enki.com with questions or concerns. **Everyone** is learning all the time, so disputes will be arbitrated first, and good-faith efforts are what is expected.
Learning happens best in a psychologically safe environment, so we've adopted the [contributor covenant](https://www.contributor-covenant.org/) as our code of conduct. If a list of rules isn't helping you envision what we're after, [here's another great resource](https://www.recurse.com/manual#sec-environment) (from The Recurse Center, read the Social Rules section) for how to participate in creating a community you'd like to be a part of. We _will_ enforce this, please get in touch with content-team@enki.com with questions or concerns. **Everyone** is learning all the time, so disputes will be arbitrated first, and good-faith efforts are what is expected.

This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. In simpler terms, it means you can't charge other people to use it, or use it to make money, but you can definitely use it to help people learn and you're free to remix or adapt what we have, so long as you attribute Enki, and the author of the work.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
author: mihaiberq
type: exercise
link: 'https://anders.com/blockchain/distributed.html'
linkType: anders
link: 'https://andersbrownworth.com/blockchain/distributed'
linkType: andersbrownworth
answer: 00008e599d1733a484631fca41fd8fcd0a39d9c08f87f95bfdadf8101c6189f6
links:
- '[Demo for the website](https://youtu.be/_160oMzblY8?t=559){video}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
author: mihaiberq
type: exercise
link: 'https://anders.com/blockchain/tokens.html'
linkType: anders
link: 'https://andersbrownworth.com/blockchain/tokens'
linkType: andersbrownworth
links:
- '[Demo for the website](https://youtu.be/_160oMzblY8?t=711){video}'
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
author: mihaiberq
type: exercise
link: 'https://anders.com/blockchain/blockchain.html'
linkType: anders
link: 'https://andersbrownworth.com/blockchain/blockchain'
linkType: andersbrownworth
answer: '5161,22336,13883'
links:
- '[Demo for the website](https://www.youtube.com/watch?v=_160oMzblY8){video}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
author: mihaiberq
type: exercise
link: 'https://anders.com/blockchain/block.html'
linkType: anders
link: 'https://andersbrownworth.com/blockchain/block'
linkType: andersbrownworth
answer: 3996
links:
- '[Demo for the website](https://www.youtube.com/watch?v=_160oMzblY8){video}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ category: must-know
links:
- >-
[Interactive tutorial of how blocks are
built](https://anders.com/blockchain/){website}
built](https://andersbrownworth.com/blockchain/){website}
practiceQuestion:
formats:
- fill-in-the-gap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ category: must-know
links:
- >-
[Interactive tutorial of how blocks are
built](https://anders.com/blockchain/){website}
built](https://andersbrownworth.com/blockchain){website}
practiceQuestion:
formats:
- fill-in-the-gap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ category: must-know
links:
- >-
[Interactive tutorial of how blocks are
built](https://anders.com/blockchain/){website}
built](https://andersbrownworth.com/blockchain){website}
practiceQuestion:
formats:
- fill-in-the-gap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
author: mihaiberq
type: exercise
link: 'https://anders.com/blockchain/public-private-keys/keys.html'
linkType: anders
link: 'https://andersbrownworth.com/blockchain/public-private-keys/keys'
linkType: andersbrownworth
answer: >-
42b698a0f0a4041b77e63488ad48c23e8e8838dd1fb7520408b121697b782ef222ee976351a7fe808101c7e79b040e5cb16afe6aa152b87e398d160c306a31bac
links:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
author: mihaiberq
type: exercise
link: 'https://anders.com/blockchain/public-private-keys/transaction.html'
linkType: anders
link: 'https://andersbrownworth.com/blockchain/public-private-keys/transaction'
linkType: andersbrownworth
links:
- '[Demo for the website](https://youtu.be/xIDL_akeras?t=153){video}'
- >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ revisionQuestion:

Now, knowing that `0` means "do nothing", we'll want the robot to take an action if `input` has any other value:

```plain-text
```pseudo
IF (input == 0) THEN
INSTRUCT do_nothing()
ELSE
Expand Down Expand Up @@ -51,15 +51,15 @@ The next step is to create different *paths*:

As a reminder, here is the instruction that led to making a grilled cheese sandwich:

```plain-text
```pseudo
INSTRUCT make_a_grill_cheese_sandwich(cheese, grater, bowl, bread, butter, pan, plate)
```

To make the sandwich with a different type of bread, we'll create a variable named `bread` which stores our type.

To make the type change depending on the `input` value we would type:

```plain-text
```pseudo
IF (input == 0) THEN
INSTRUCT do_nothing()
ELSE IF (input == 1) THEN
Expand Down Expand Up @@ -91,7 +91,7 @@ You can chain multiple conditions using `ELSE IF`. If the `input` is `1` then th

Complete the condition such that you only make a sandwich if you're hungry:

```plain-text
```pseudo
hungry = ???
??? (??? == true) THEN
Expand Down Expand Up @@ -119,7 +119,7 @@ hungry = ???

Complete the following condition chain:

```plain-text
```pseudo
??? condition_1 THEN
INSTRUCT do_something()
??? condition_2 THEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ revisionQuestion:

The `input` variable will be used to help the robot decide which action to take. When the value is `0` it will do nothing.

```plain-text
```pseudo
IF (input == 0) THEN
INSTRUCT do_nothing()
```
Expand Down Expand Up @@ -58,7 +58,7 @@ You are not limited to the equality operator. Here is a table of the most common

What do you think the robot will do here?

```plain-text
```pseudo
hungry = false
IF (hungry == true) THEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Remember that grilled-cheese-making-robot that we programmed? Let's repurpose it

Let's create a variable named `input`, and based on its value the robot will make the sandwich with a different type of bread.

```plain-text
```pseudo
input = 0
```

Expand All @@ -40,7 +40,7 @@ In the following insights, we'll use `input` to help our robot make decisions.

What type is the `input` variable?

```plain-text
```pseudo
input = 0
```

Expand All @@ -57,7 +57,7 @@ input = 0

What type is the `input` variable?

```plain-text
```pseudo
input = "0"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Since we're not using them at the moment, let's use groups of numbers for the *p

To do this, we'll have to use the `AND` logical operator:

```plain-text
```pseudo
IF (input == 0) THEN
INSTRUCT do_nothing()
ELSE IF (
Expand Down Expand Up @@ -83,7 +83,7 @@ Which of these is **not** a logical operator?

Fill in the gaps:

```plain-text
```pseudo
??? - negates the condition
??? - all conditions must evaluate to true
??? - any condition must evaluate to true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ We can think of a function as divided into three parts.
Here's how you can write the `multiplyTwoNumbers` function using our own made-up[1] language:

```plain-text
```pseudo
FUNCTION multiplyTwoNumbers
INPUT num1, num2
INSTRUCT result = multiply(num1, num2)
Expand All @@ -44,7 +44,7 @@ FUNCTION multiplyTwoNumbers

To call this function we write its name, followed by a pair of `()`.

```plain-text
```pseudo
INSTRUCT multiplyTwoNumbers(5, 3)
```

Expand All @@ -65,7 +65,7 @@ A function is made out of three parts:

Match the definitions with their name:

```plain-text
```pseudo
1. ???
2. ???
3. ???
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ revisionQuestion:

Let's continue preparing the sandwich-making instructions for our robot by writing a function to perform the second step of our recipe[1] - building out the sandwich from the ingredients.

```plain-text
```pseudo
FUNCTION build_sandwich
INPUT cheese_bowl, sliced_bread, butter
INSTRUCT buttered_slices = butter_the_bread(sliced_bread, butter)
Expand All @@ -37,14 +37,14 @@ Computers are 100% literal[2] like that. We have to spell out everything **exact

For example, in the code above, take a look at the last two lines of the function body:

```plain-text
```pseudo
INSTRUCT sandwich = combine_slices(buttered_slices_with_cheese)
OUTPUT sandwich
```

If you forgot to save the output of `combine_slices` into the variable `sandwich`:

```plain-text
```pseudo
INSTRUCT combine_slices(buttered_slices_with_cheese)
OUTPUT sandwich
```
Expand All @@ -60,7 +60,7 @@ Let's practice function creation!

Write a function called `fill_glass` that takes in `glass` and `water`, calls `pour` function to pour the `water` into the `glass` and produces a `glass_of_water` as the result:

```plain-text
```pseudo
??? ???
??? glass, water
??? glass_of_water = ???(glass, water)
Expand All @@ -82,7 +82,7 @@ ENDFUNCTION

Write a function called `fill_glass` that takes in `glass` and `water`, calls `pour` function to pour the `water` into the `glass` and produces a `glass_of_water` as the result:

```plain-text
```pseudo
??? ???
??? glass, water
??? glass_of_water = ???(glass, water)
Expand Down Expand Up @@ -137,14 +137,14 @@ In some languages, instructions usually end with a semicolon `;`.

This means that the instruction:

```plain-text
```pseudo
study_buddy = "enki"
```

will not work in those languages!

We have to end it with a `;` like this:

```plain-text
```pseudo
study_buddy = "enki";
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Now it's time to run the functions we create as commands for the robot.

The final part of the code we're giving the robot is:

```plain-text
```pseudo
FUNCTION make_a_grill_cheese_sandwich
INPUT cheese, grater, bowl, bread, butter, pan, plate
INSTRUCT cheese_bowl, sliced_bread = prepare_ingredients(cheese, grater, bowl, bread)
Expand All @@ -34,7 +34,7 @@ Now for the last part.

Let's tell the robot to run the `make_a_grill_cheese_sandwich` function:

```plain_text
```pseudo
INSTRUCT make_a_grill_cheese_sandwich(cheese, grater, bowl, bread, butter, pan, plate)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The robot instructions are almost done! We're getting hungry.

Let's do the part 3 of our recipe[1] now, the grilling of the sandwich:

```plain-text
```pseudo
FUNCTION grill_sandwich
INPUT sandwich, pan, plate
INSTRUCT heated_pan = preheat_the_pan(pan)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Let's write some code to tell our robot how to make a sandwich!

To get us started, start with the preparation of the ingredients first.

```plain-text
```pseudo
FUNCTION prepare_ingredients
INPUT cheese, grater, bowl, bread
INSTRUCT cheese_bowl = grate_cheese_in_the_bowl(grater, cheese, bowl)
Expand Down
Loading

0 comments on commit c9c00a4

Please sign in to comment.