Skip to content

Commit e8248ab

Browse files
committed
New Crowdin translations by GitHub Action
1 parent f2b748c commit e8248ab

File tree

108 files changed

+3528
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+3528
-0
lines changed

de-DE/code/starter/main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ingredients
2+
protein = 'TOFU'
3+
veg_1 = 'CARROT'
4+
veg_2 = 'PEAS'
5+
carb = 'RICE'
6+
side = 'BOILED EGGS'
7+
garnish = 'MINT'
8+
emoji = '🍽️😋'
9+
10+
# Final recipe print
11+
print(f'Start with a scoop of {carb}',f'Top with diced {veg_1} and {veg_2}',f'Add grilled {protein}',f'Garnish with {garnish}',f'Serve with a side of {side}')
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: "Python bytes - Recipe wreckers"
2+
identifier: "python-bytes-recipe-wreckers"
3+
type: 'python'
4+
build: true

de-DE/images/banner.png

30.9 KB
Loading

de-DE/meta.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
title: Python bytes - Recipe wreckers
2+
hero_image: images/banner.png
3+
description: Create and secretly sabotage a recipe using Python print formatting and string methods.
4+
meta_title: Python coding projects for kids and teens | Recipe Wreckers
5+
meta_description: Learn Python with the Raspberry Pi Foundation. Make and secretly ruin a recipe using print(), f-strings, emoji, and .replace().
6+
version: 1
7+
listed: true
8+
copyedit: false
9+
last_tested: "2025-04-04"
10+
steps:
11+
- title: step_1
12+
- title: step_2
13+
completion:
14+
- engaged
15+
- title: step_3
16+
- title: step_4
17+
- title: step_5
18+
- title: step_6
19+
completion:
20+
- internal
21+
- external

de-DE/resources/mentor.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Mentor Notes: Recipe Wreckers
2+
3+
## Overview
4+
5+
This lesson builds on the basics of `print()` and f-strings by introducing:
6+
7+
- Print formatting using `sep=` and `end=`
8+
- String case methods (`.lower()`)
9+
- Pranking techniques with `.replace()`
10+
- Visual enhancement with emoji
11+
12+
Learners take an existing recipe and gradually transform it into something easier to read, then secretly sabotage it for fun.
13+
14+
---
15+
16+
## What They Will Learn
17+
18+
- How to split long lines of code for readability
19+
- How to use `sep='\n'` to add line breaks
20+
- How to insert emoji as bullet points
21+
- How to use `.lower()` for styling
22+
- How to use `.replace()` for creative pranks
23+
24+
---
25+
26+
## Tips
27+
28+
- Encourage experimentation with emoji
29+
- Learners should run code before and after each step to understand the impact
30+
- Reinforce that `.replace()` doesn’t change the original string — it returns a new one
31+
32+
---
33+
34+
## Challenges
35+
36+
- Ensuring correct placement of `sep=`, especially when using emoji + newline
37+
- Using `.replace()` safely without breaking strings
38+
- Managing variable names consistently between tasks
39+
40+
---
41+
42+
## Extension Ideas
43+
44+
- Ask learners to write their own recipe and sabotage it
45+
- Introduce `.count()` or `.find()` to inspect string contents
46+
- Create a two-option prank menu using conditionals (if ready)
47+

de-DE/solutions/main.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
emoji = '🍽️😋'.replace('😋', '🤢')
2+
3+
protein = 'TOFU'.replace('FU', 'AD') # ➝ TOAD
4+
veg_1 = 'CARROT'.replace('CAR', '') # ➝ ROT
5+
carb = 'RICE'.replace('R', 'L') # ➝ LICE
6+
veg_2 = 'PEAS'
7+
garnish = 'MINT'
8+
side = 'BOILED EGGS'
9+
10+
print(
11+
f'{emoji} Start with a scoop of {carb.lower()}',
12+
f'Top with diced {veg_1.lower()} and {veg_2.lower()}',
13+
f'Add grilled {protein.title()}',
14+
f'Garnish with {garnish.lower()}',
15+
f'Serve with a side of {side.lower()}',
16+
sep='\n'
17+
)

de-DE/step_1.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<h2 class="c-project-heading--task">Make the code easier to read</h2>
2+
3+
\--- task ---
4+
5+
Split the long print statement onto multiple lines so it’s easier to understand.
6+
7+
\--- /task ---
8+
9+
<h2 class="c-project-heading--explainer">Readable code is good code</h2>
10+
11+
A café manager has written all the recipe print parts on one long line — it works, but it's hard to read!
12+
13+
Luckily, Python lets you write long `print()` statements across multiple lines.
14+
You just need to **end each part with a comma**, and Python will still treat it as one command.
15+
16+
---
17+
18+
**Run the program once** before making changes and look at the output.
19+
Then split the print statement across multiple lines and run it again.
20+
The output should be the same — but the code is much easier to read!
21+
22+
<div class="c-project-code">
23+
--- code ---
24+
---
25+
language: python
26+
filename: main.py
27+
line_numbers: true
28+
line_number_start: 11
29+
line_highlights:
30+
---
31+
32+
print(
33+
f'Start with a scoop of {carb}',
34+
f'Top with diced {veg_1} and {veg_2}',
35+
f'Add grilled {protein}',
36+
f'Garnish with {garnish}',
37+
f'Serve with a side of {side}'
38+
)
39+
40+
\--- /code ---
41+
42+
</div>
43+
44+
<div class="c-project-callout c-project-callout--tip">
45+
46+
### Tip
47+
48+
Make sure you leave **commas** at the end of each line inside the print statement!
49+
50+
</div>

de-DE/step_2.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<h2 class="c-project-heading--task">Fix the output format</h2>
2+
3+
\--- task ---
4+
5+
Use `sep='\n'` to print each part of the recipe on its own line.
6+
7+
\--- /task ---
8+
9+
<h2 class="c-project-heading--explainer">Split the output into lines</h2>
10+
11+
Right now, all the recipe lines appear squashed together.
12+
You can use the `sep=` option in `print()` to tell Python what to put **between** each item.
13+
14+
By setting `sep='\n'`, you’ll get a **new line** between every part of the print.
15+
16+
Here’s what your code should look like:
17+
18+
<div class="c-project-code">
19+
--- code ---
20+
---
21+
language: python
22+
filename: main.py
23+
line_numbers: true
24+
line_number_start: 11
25+
line_highlights: 17
26+
---
27+
28+
print(
29+
f'Start with a scoop of {carb}',
30+
f'Top with diced {veg_1} and {veg_2}',
31+
f'Add grilled {protein}',
32+
f'Garnish with {garnish}',
33+
f'Serve with a side of {side}',
34+
sep='\n'
35+
)
36+
37+
\--- /code ---
38+
39+
</div>
40+
41+
<div class="c-project-callout c-project-callout--debug">
42+
43+
### Debugging
44+
45+
If your recipe is still on one line, check:
46+
47+
- Did you add `sep='\n'` at the end of the `print()`?
48+
- Are the commas in place after each line?
49+
50+
</div>

de-DE/step_3.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<h2 class="c-project-heading--task">Add emoji bullets</h2>
2+
3+
\--- task ---
4+
5+
Use the emoji variable to add a bullet point to every line.
6+
7+
\--- /task ---
8+
9+
<h2 class="c-project-heading--explainer">Make your list look amazing</h2>
10+
11+
Now that the lines are separated, let’s add some bullet points!
12+
13+
You can do this by changing the separator again, this time to `sep='\n' + emoji`.
14+
15+
Also, you’ll want to manually add the emoji at the **start of the first line**, since `sep` only adds it _between_ lines.
16+
17+
<div class="c-project-code">
18+
--- code ---
19+
---
20+
language: python
21+
filename: main.py
22+
line_numbers: true
23+
line_number_start: 11
24+
line_highlights: 12, 17
25+
---
26+
27+
print(
28+
f'{emoji}Start with a scoop of {carb}',
29+
f'Top with diced {veg_1} and {veg_2}',
30+
f'Add grilled {protein}',
31+
f'Garnish with {garnish}',
32+
f'Serve with a side of {side}',
33+
sep='\n' + emoji
34+
)
35+
36+
\--- /code ---
37+
38+
</div>
39+
40+
<div class="c-project-callout c-project-callout--tip">
41+
42+
### Tip
43+
44+
Try changing the `emoji` variable at the top to something cute like:<br />
45+
• 🍽️😋<br />
46+
• 🧁<br />
47+
• 🍱
48+
49+
</div>

de-DE/step_4.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<h2 class="c-project-heading--task">Fix the ingredient formatting</h2>
2+
3+
\--- task ---
4+
5+
Use `.title()` and `.lower()` on the ingredient values inside the `print()` line.
6+
7+
\--- /task ---
8+
9+
<h2 class="c-project-heading--explainer">Make the ingredients readable</h2>
10+
11+
The ingredients are written in all uppercase — let’s make them easier to read in the final recipe.
12+
13+
- Use `.lower()` to make all the letters lowercase
14+
15+
Update each of the `print()` lines. Two lines have been done for you below.
16+
17+
<div class="c-project-code">
18+
--- code ---
19+
---
20+
language: python
21+
filename: main.py
22+
line_numbers: true
23+
line_number_start: 14
24+
line_highlights:
25+
---
26+
27+
f'Add grilled {protein.lower()}'
28+
f'Garnish with {garnish.lower()}'
29+
30+
\--- /code ---
31+
32+
</div>
33+
34+
<div class="c-project-callout c-project-callout--debug">
35+
36+
### Debugging
37+
38+
Make sure your parentheses and curly braces match correctly when calling `.lower()` inside a string.
39+
40+
</div>

0 commit comments

Comments
 (0)