This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
350 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { TExerciseData } from "@/types"; | ||
|
||
export default { | ||
route: "5-variables", | ||
title: "Variables 📦", | ||
content: ` | ||
Variables are used to store data that can be used later in the program. | ||
To declare a variable, you need to use the \`=\` operator. The \`=\` operator assigns a value to a variable. | ||
- **Name**: The Name is the name of the variable. | ||
Here is an example of how to declare a variable: | ||
~~~ | ||
Name = "Melon Musk" | ||
~~~ | ||
In this example, the variable Name is assigned the value "Melon Musk". | ||
--- | ||
# TASK | ||
Your task is to fix the variable Name so that it contains the correct name "Elon Musk" and then print it | ||
--- | ||
`, | ||
defaultCode: `Name = "Melon Musk" | ||
return Name`, | ||
expectedResult: `Elon Musk`, | ||
nextRoute: "6-messaging", | ||
prevRoute: "4-calculate", | ||
} as TExerciseData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { TExerciseData } from "@/types"; | ||
|
||
export default { | ||
route: "6-messaging", | ||
title: "Sending Messages 💬", | ||
content: ` | ||
Now that you know how to print stuff, do basic calculations and make variables, | ||
let's move on to the next step. In this exercise, you will learn how to send messages to a process. | ||
To send a message, you need to use the \`Send\` function. The \`Send\` function takes a table containing data for whom and what to send. | ||
- **Send**: The Send function is globally available in the aos interactive environment. | ||
- **Target**: The Target field is a string containing the process ID of the process you want to send the message to. | ||
- **Data**: The Data is the text message you want received by the receiving process. In this example, the message is "Hello World!". | ||
Here is an example of how to send a message to a process: | ||
~~~ | ||
Send({ Target = "process ID", Data = "Hello World!" }) | ||
~~~ | ||
--- | ||
# TASK | ||
Your task is to send a message to yourself with the text "Hello World!". | ||
Your own process ID is stored in the global variable \`ao.id\`. | ||
You can either copy and paste the process ID as a string or use the global variable \`ao.id\` in Target. | ||
--- | ||
`, | ||
defaultCode: `Send({ | ||
Target = "process ID", | ||
Data = "Hello World!" | ||
})`, | ||
expectedResult: `Hello World!`, | ||
checkInbox: true, | ||
fromId: "SELF", | ||
nextRoute: "#", | ||
prevRoute: "4-calculate", | ||
} as TExerciseData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters