fix(curriculum): add reminder to include final colon for if and else statements (#54463)

Co-authored-by: Dario-DC <105294544+Dario-DC@users.noreply.github.com>
This commit is contained in:
Supravisor
2024-04-22 09:14:32 +02:00
committed by GitHub
co-authored by Dario-DC
parent 0be289de84
commit cddce2b738
2 changed files with 2 additions and 2 deletions
@@ -28,7 +28,7 @@ const {block_body} = __helpers.python.getBlock(commentless_code, /for\s+char\s+i
assert.notMatch(block_body, /print\s*\(\s*char\s*==\s*("|')\s\1\s*\)/);
```
You should replace `print(char == ' ')` with an `if` statement that triggers when `char == ' '`. Do not use parentheses to enclose the `if` condition.
You should replace `print(char == ' ')` with an `if` statement that triggers when `char == ' '`. Do not use parentheses to enclose the `if` condition and remember to include the final colon.
```js
const commentless_code = __helpers.python.removeComments(code);
@@ -22,7 +22,7 @@ To fix it, add an `else` clause after `encrypted_text += char` and indent all th
# --hints--
You should create an `else` clause.
You should create an `else` clause. Remember to include the final colon.
```js
const commentless_code = __helpers.python.removeComments(code);