Skip to content

Commit f2b748c

Browse files
Merge pull request #24 from raspberrypilearning/draft
Add empty lines for translation
2 parents 5bda5df + 578bb4f commit f2b748c

File tree

6 files changed

+39
-1
lines changed

6 files changed

+39
-1
lines changed

en/step_1.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<h2 class="c-project-heading--task">Make the code easier to read</h2>
2+
23
--- task ---
4+
35
Split the long print statement onto multiple lines so it’s easier to understand.
6+
47
--- /task ---
58

69
<h2 class="c-project-heading--explainer">Readable code is good code</h2>
@@ -25,14 +28,17 @@ line_numbers: true
2528
line_number_start: 11
2629
line_highlights:
2730
---
31+
2832
print(
2933
f'Start with a scoop of {carb}',
3034
f'Top with diced {veg_1} and {veg_2}',
3135
f'Add grilled {protein}',
3236
f'Garnish with {garnish}',
3337
f'Serve with a side of {side}'
3438
)
39+
3540
--- /code ---
41+
3642
</div>
3743

3844
<div class="c-project-callout c-project-callout--tip">

en/step_2.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<h2 class="c-project-heading--task">Fix the output format</h2>
2+
23
--- task ---
4+
35
Use `sep='\n'` to print each part of the recipe on its own line.
6+
47
--- /task ---
58

69
<h2 class="c-project-heading--explainer">Split the output into lines</h2>
@@ -20,8 +23,8 @@ filename: main.py
2023
line_numbers: true
2124
line_number_start: 11
2225
line_highlights: 17
23-
2426
---
27+
2528
print(
2629
f'Start with a scoop of {carb}',
2730
f'Top with diced {veg_1} and {veg_2}',
@@ -30,7 +33,9 @@ print(
3033
f'Serve with a side of {side}',
3134
sep='\n'
3235
)
36+
3337
--- /code ---
38+
3439
</div>
3540

3641
<div class="c-project-callout c-project-callout--debug">

en/step_3.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11

22
<h2 class="c-project-heading--task">Add emoji bullets</h2>
3+
34
--- task ---
5+
46
Use the emoji variable to add a bullet point to every line.
7+
58
--- /task ---
69

710
<h2 class="c-project-heading--explainer">Make your list look amazing</h2>
@@ -21,6 +24,7 @@ line_numbers: true
2124
line_number_start: 11
2225
line_highlights: 12, 17
2326
---
27+
2428
print(
2529
f'{emoji}Start with a scoop of {carb}',
2630
f'Top with diced {veg_1} and {veg_2}',
@@ -29,7 +33,9 @@ print(
2933
f'Serve with a side of {side}',
3034
sep='\n' + emoji
3135
)
36+
3237
--- /code ---
38+
3339
</div>
3440

3541
<div class="c-project-callout c-project-callout--tip">

en/step_4.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<h2 class="c-project-heading--task">Fix the ingredient formatting</h2>
2+
23
--- task ---
4+
35
Use `.title()` and `.lower()` on the ingredient values inside the `print()` line.
6+
47
--- /task ---
58

69
<h2 class="c-project-heading--explainer">Make the ingredients readable</h2>
@@ -20,9 +23,12 @@ line_numbers: true
2023
line_number_start: 14
2124
line_highlights:
2225
---
26+
2327
f'Add grilled {protein.lower()}'
2428
f'Garnish with {garnish.lower()}'
29+
2530
--- /code ---
31+
2632
</div>
2733

2834
<div class="c-project-callout c-project-callout--debug">

en/step_5.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<h2 class="c-project-heading--task">Sabotage the recipe with .replace()</h2>
2+
23
--- task ---
4+
35
Use `.replace()` to secretly swap ingredients with disgusting ones!
6+
47
--- /task ---
58

69
<h2 class="c-project-heading--explainer">Let the prank begin</h2>
@@ -18,9 +21,12 @@ line_numbers: true
1821
line_number_start: 2
1922
line_highlights:
2023
---
24+
2125
protein = 'TOFU'.replace('FU', 'AD') # ➝ TOAD
2226
veg_1 = 'CARROT'.replace('CAR', '') # ➝ ROT
27+
2328
--- /code ---
29+
2430
</div>
2531

2632
<div class="c-project-callout c-project-callout--tip">

en/step_6.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<h2 class="c-project-heading--task">Replace the emoji for fun (or horror)</h2>
2+
23
--- task ---
4+
35
Use `.replace()` on the emoji variable to turn cute bullets into creepy ones.
6+
47
--- /task ---
58

69
<h2 class="c-project-heading--explainer">Change the mood with emoji</h2>
@@ -18,8 +21,11 @@ line_numbers: true
1821
line_number_start: 8
1922
line_highlights:
2023
---
24+
2125
emoji = '🍽️😋'.replace('😋', '🤢') # ➝ 🍽️🤢
26+
2227
--- /code ---
28+
2329
</div>
2430

2531
Or replace the whole thing completely:
@@ -33,8 +39,11 @@ line_numbers: true
3339
line_number_start: 8
3440
line_highlights:
3541
---
42+
3643
emoji = '🪳💀'
44+
3745
--- /code ---
46+
3847
</div>
3948

4049
<div class="c-project-callout c-project-callout--tip">

0 commit comments

Comments
 (0)