8000 update text for example · ShMcK/coderoad-python-test@f5151cf · GitHub
[go: up one dir, main page]

Skip to content

Commit f5151cf

Browse files
committed
update text for example
1 parent 82f3b34 commit f5151cf

File tree

3 files changed

+26
-32
lines changed

3 files changed

+26
-32
lines changed

TUTORIAL.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,25 @@
1-
# Insert Tutorial's Title here
1+
# Basic Python Example
22

3-
Short description to be shown as a tutorial's subtitle
3+
A test to try Python with CodeRoad
44

5-
## L1 Put Level's title here
5+
## L1 Add some numbers together
66

7-
> Level's summary: a short description of the level's content in one line.
7+
> Test out the basics
88
9-
The level is identified and distributed following the regex:
109

11-
```js
12-
/^(##\s(?<levelId>L\d+)\s(?<levelTitle>.*)\n*(>\s*(?<levelSummary>.*))?\n+(?<levelContent>[^]*))/;
13-
```
14-
15-
The Level can be split into steps or have no steps. Levels without steps are meant to be used as only informative content, for example: use a Level without steps at the end of the tutorial to congratulate the student and provide some additional related resources.
16-
17-
Tutorial's content. It can span through multiple paragraphs and use headers `####` and `#####`.
1810

19-
Steps are identified and their content described using the following regex:
11+
This is just a test, so here's the answer:
2012

21-
```js
22-
/^(###\s(?<stepId>(?<levelId>L\d+)S\d+)\s(?<stepTitle>.*)\n+(?<stepContent>[^]*))/;
13+
```py
14+
def add(*args):
15+
'''Add 1 or more numbers together'''
16+
total = 0
17+
for arg in args:
18+
total += arg
19+
return total
2320
```
2421

25-
The numbers identifying the levels and steps are irrelevant but keep in mind that they will be executed in order. A level with id `10` will be executed before another one with id `20` and so on. These `ids` should have a match in the configuration file (`coderoad.yaml`).
26-
27-
### L1S1 A step title (not being shown on the extension at this moment)
28-
29-
Short description of the step's purpose. Should be short and fit in one line
30-
31-
**Important**
22+
### L1S1 Add
3223

33-
1. Both level and step ids must have an entry with the same id on the configuration file;
34-
2. Step Ids are based on its level id. Any step from level `L234` must start with `L234S`, followed by the sequential digits.
24+
Complete the `add` function. It should be able to add one or more numbers together.
25+
For example: `add(1) = 1`, `add(1, 2) = 3`, and `add(1, 2, 3) = 6`.

coderoad.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ levels:
1515
steps:
1616
- id: L1S1
1717
setup:
18-
subtasks: false
18+
files:
19+
- src/example.py
1920

tutorial.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"version": "0.1.0",
33
"summary": {
4-
"title": "Insert Tutorial's Title here",
5-
"description": "Short description to be shown as a tutorial's subtitle"
4+
"title": "Basic Python Example",
5+
"description": "A test to try Python with CodeRoad"
66
},
77
"config": {
88
"testRunner": {
@@ -31,7 +31,9 @@
3131
{
3232
"id": "L1S1",
3333
"setup": {
34-
"subtasks": false,
34+
"files": [
35+
"src/example.py"
36+
],
3537
"commits": [
3638
"2e9f2fd92f0b7b8854e3d7bf47ae8c6787800066"
3739
]
@@ -41,12 +43,12 @@
4143
"cdbe4321b9c88a0067de3f65279ab9fb54a225e2"
4244
]
4345
},
44-
"content": "Short description of the step's purpose. Should be short and fit in one line\n\n**Important**\n\n1. Both level and step ids must have an entry with the same id on the configuration file;\n2. Step Ids are based on its level id. Any step from level `L234` must start with `L234S`, followed by the sequential digits."
46+
"content": "Complete the `add` function. It should be able to add one or more numbers together. \nFor example: `add(1) = 1`, `add(1, 2) = 3`, and `add(1, 2, 3) = 6`."
4547
}
4648
],
47-
"title": "Put Level's title here",
48-
"summary": "Level's summary: a short description of the level's content in one line.",
49-
"content": "The level is identified and distributed following the regex:\n\n```js\n/^(##\\s(?<levelId>L\\d+)\\s(?<levelTitle>.*)\\n*(>\\s*(?<levelSummary>.*))?\\n+(?<levelContent>[^]*))/;\n```\n\nThe Level can be split into steps or have no steps. Levels without steps are meant to be used as only informative content, for example: use a Level without steps at the end of the tutorial to congratulate the student and provide some additional related resources.\n\nTutorial's content. It can span through multiple paragraphs and use headers `####` and `#####`.\n\nSteps are identified and their content described using the following regex:\n\n```js\n/^(###\\s(?<stepId>(?<levelId>L\\d+)S\\d+)\\s(?<stepTitle>.*)\\n+(?<stepContent>[^]*))/;\n```\n\nThe numbers identifying the levels and steps are irrelevant but keep in mind that they will be executed in order. A level with id `10` will be executed before another one with id `20` and so on. These `ids` should have a match in the configuration file (`coderoad.yaml`)."
49+
"title": "Add some numbers together",
50+
"summary": "Test out the basics",
51+
"content": "This is just a test, so here's the answer:\n\n```py\ndef add(*args):\n '''Add 1 or more numbers together'''\n total = 0\n for arg in args:\n total += arg\n return total\n```"
5052
}
5153
]
5254
}

0 commit comments

Comments
 (0)
0