Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions de-DE/code/starter/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Gross Groceries recipe card

# Ingredients and amounts for 1 person


# Number of servings


# Scaled-up ingredients


# Print recipe instructions
4 changes: 4 additions & 0 deletions de-DE/code/starter/project_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: "Python Bytes - Gross Groceries"
identifier: "python-bytes-gross-groceries"
type: python
build: true
Binary file added de-DE/images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions de-DE/mentor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Mentor Notes: Gross Groceries

## Project Overview

In this project, learners will use Python to help a strange restaurant owner create a revolting recipe card. They’ll start with simple ingredients and build up to printing full recipe instructions using f-strings. By the end, learners will have used variables, strings, numbers, simple arithmetic, and f-strings across multiple steps.

---

## What Learners Will Practise

- Creating and using variables
- Combining strings and numbers with f-strings
- Performing basic multiplication in code
- Writing multi-line Python programs with clear structure

---

## Teaching Tips

- Encourage learners to come up with their own disgusting ingredients — the sillier, the better!
- Prompt them to read printed output carefully to understand the effect of their changes.
- Reinforce that f-strings are a powerful way to combine text and values without needing multiple `+` symbols.

---

## Extension Ideas

- Let learners use `input()` to ask how many people the recipe should serve
- Encourage them to use `\n` to format multi-line recipe cards
- Add even more ingredients or steps to the recipe
20 changes: 20 additions & 0 deletions de-DE/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title: Python bytes - Gross groceries
hero_image: images/banner.png
description: Write a revolting recipe card using variables, f-strings, and maths
meta_title: Learn to code with Gross Groceries | Python Bytes
meta_description: Learn how to use Python f-strings and variables to print a disgusting recipe for an odd restaurant.
version: 1
listed: true
copyedit: false
last_tested: "2025-04-14"
steps:
- title: step_1
- title: step_2
completion:
- engaged
- title: step_3
- title: step_4
- title: step_5
completion:
- internal
- external
72 changes: 72 additions & 0 deletions de-DE/resources/dataframe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[
{
"filename": "meta.yml",
"path": "en\/",
"content": "title: Python bytes - Gross groceries\nhero_image: images\/banner.png\ndescription: Write a revolting recipe card using variables, f-strings, and maths\nmeta_title: Learn to code with Gross Groceries | Python Bytes\nmeta_description: Learn how to use Python f-strings and variables to print a disgusting recipe for an odd restaurant.\nversion: 1\nlisted: false\ncopyedit: false\nlast_tested: \"2025-04-14\"\nsteps:\n - title: step_1\n - title: step_2\n completion:\n - engaged\n - title: step_3\n - title: step_4\n - title: step_5\n completion:\n - internal\n - external\n"
},
{
"filename": "main.py",
"path": "en\/code\/starter\/",
"content": "# Gross Groceries recipe card\n\n# Ingredients and amounts for 1 person\n\n\n# Number of servings\n\n\n# Scaled-up ingredients\n\n\n# Print recipe instructions\n"
},
{
"filename": "project_config.yml",
"path": "en\/code\/starter\/",
"content": "name: \"Python Bytes - Gross Groceries\"\nidentifier: \"python-bytes-gross-groceries\"\ntype: python\nbuild: true\n"
},
{
"filename": "mentor.md",
"path": "en\/",
"content": "# Mentor Notes: Gross Groceries\n\n## Project Overview\n\nIn this project, learners will use Python to help a strange restaurant owner create a revolting recipe card. They’ll start with simple ingredients and build up to printing full recipe instructions using f-strings. By the end, learners will have used variables, strings, numbers, simple arithmetic, and f-strings across multiple steps.\n\n---\n\n## What Learners Will Practise\n\n- Creating and using variables\n- Combining strings and numbers with f-strings\n- Performing basic multiplication in code\n- Writing multi-line Python programs with clear structure\n\n---\n\n## Teaching Tips\n\n- Encourage learners to come up with their own disgusting ingredients — the sillier, the better!\n- Prompt them to read printed output carefully to understand the effect of their changes.\n- Reinforce that f-strings are a powerful way to combine text and values without needing multiple `+` symbols.\n\n---\n\n## Extension Ideas\n\n- Let learners use `input()` to ask how many people the recipe should serve\n- Encourage them to use `\\n` to format multi-line recipe cards\n- Add even more ingredients or steps to the recipe\n"
},
{
"filename": "step_1.md",
"path": "en\/",
"content": "<h2 class=\"c-project-heading--task\">Write your first disgusting ingredient<\/h2>\n--- task ---\nAdd a gross ingredient and print it using an f-string\n--- \/task ---\n\n<h2 class=\"c-project-heading--explainer\">Start your recipe<\/h2>\n\nThe owner of an odd restaurant has decided to use code to help make their recipes. You're the coder they've hired. 🧑‍💻 \nYour job is to help create the grossest recipe card ever 🤢\n\nLet’s start by adding your first ingredient. But before we write any code, you’ll notice some lines that start with `#` — these are **comments**.\n\nComments are notes in your code that help you (and others!) understand what each part does. Python ignores them when your program runs.\n\nNow try this:\n\n1. Choose a disgusting ingredient like `'maggot mash 🐛'` or `'slug slime 🐌'`.\n2. Decide how much of it you want to use. Let’s say `50` grams.\n3. Use an **f-string** to print the amount and the ingredient.\n\n<div class=\"c-project-code\">\n--- code ---\n---\nlanguage: python\nfilename: main.py\nline_numbers: true\nline_number_start: 3\nline_highlights: 5-6,11\n---\n# Ingredients and amounts for 1 person\n\ningredient_1 = 'maggot mash 🐛'\namount_1 = 50\n# Number of servings\n\n\n# Scaled-up ingredients\nprint(f'{amount_1}g of {ingredient_1}')\n--- \/code ---\n<\/div>\n\n<div class=\"c-project-output\">\n<pre>50g of maggot mash 🐛<\/pre>\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--tip\">\n\n### Tip\n\nIf your code prints nothing or shows an error, check that:\n- You used **quotes** around your ingredient name (it's a string!)\n- You’ve spelled the variable names correctly\n- You used the `f` before the string in `print(f'...')`\n\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--debug\">\n\n### Debugging\n\n- If Python says there's a `NameError`, you may have a typo in your variable name\n- If you see `{amount_1}` in the output instead of the number, make sure your string starts with `f`\n\n<\/div>\n"
},
{
"filename": "step_2.md",
"path": "en\/",
"content": "<h2 class=\"c-project-heading--task\">Feed more people<\/h2>\n--- task ---\nAdd a servings variable and use it to scale up your ingredient\n--- \/task ---\n\n<h2 class=\"c-project-heading--explainer\">Make it serve more than one!<\/h2>\n\nRight now, your ingredient amount is for just **one** person. But what if you wanted to feed 3, or even 10 people?\n\nInstead of writing new numbers, you can **multiply** the amount by the number of servings — using maths inside your f-string!\n\nLet’s add a variable called `servings`, and update your print line to use it:\n\n<div class=\"c-project-code\">\n--- code ---\n---\nlanguage: python\nfilename: main.py\nline_numbers: true\nline_number_start: 7\nline_highlights: 8,11\n---\n# Number of servings\nservings = 3\n\n# Scaled-up ingredients\nprint(f'{amount_1 * servings}g of {ingredient_1}')\n--- \/code ---\n<\/div>\n\n<div class=\"c-project-output\">\n<pre>150g of maggot mash 🐛<\/pre>\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--tip\">\n\n### Tip\n\nYou can do maths inside an f-string using `{}` — Python works it out before printing the message!\n\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--debug\">\n\n### Debugging\n\n- Make sure your variable name is `servings`, not `serving` or `serves`\n- Don’t forget the `*` for multiplication\n\n<\/div>\n"
},
{
"filename": "step_3.md",
"path": "en\/",
"content": "<h2 class=\"c-project-heading--task\">Add more ingredients<\/h2>\n--- task ---\nAdd two more gross ingredients and scale them up using f-strings\n--- \/task ---\n\n<h2 class=\"c-project-heading--explainer\">Make your recipe extra disgusting<\/h2>\n\nOne ingredient is never enough for a proper disgusting dish! Let's add two more ingredients to your recipe.\n\n1. Add `ingredient_2` and `ingredient_3` — give them gross names like `'sock juice 🧦'` or `'toenail sprinkles 🦶'`.\n2. Add matching `amount_2` and `amount_3` values.\n3. Use f-strings to print out **all three ingredients**, scaled up using your `servings` variable.\n\n<div class=\"c-project-code\">\n--- code ---\n---\nlanguage: python\nfilename: main.py\nline_numbers: true\nline_number_start: 3\nline_highlights: 8-10,11-12,18-19\n---\ningredient_2 = 'sock juice 🧦'\namount_2 = 30\n\ningredient_3 = 'toenail sprinkles 🦶'\namount_3 = 10\n# Number of servings\nservings = 3\n\n# Scaled-up ingredients\nprint(f'{amount_1 * servings}g of {ingredient_1}')\nprint(f'{amount_2 * servings}ml of {ingredient_2}')\nprint(f'{amount_3 * servings}g of {ingredient_3}')\n--- \/code ---\n<\/div>\n\n<div class=\"c-project-output\">\n<pre>150g of maggot mash 🐛\n90ml of sock juice 🧦\n30g of toenail sprinkles 🦶<\/pre>\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--tip\">\n\n### Tip\n\nYou can label each ingredient with different units like `g` (grams) or `ml` (millilitres) depending on what it is!\n\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--debug\">\n\n### Debugging\n\n- Make sure your variable names match exactly — Python is case-sensitive!\n- Don’t forget to multiply by `servings` inside each f-string\n\n<\/div>\n"
},
{
"filename": "step_4.md",
"path": "en\/",
"content": "<h2 class=\"c-project-heading--task\">Start your recipe instructions<\/h2>\n--- task ---\nUse an f-string to describe the number of people and the first ingredient\n--- \/task ---\n\n<h2 class=\"c-project-heading--explainer\">Tell the chef what to do<\/h2>\n\nNow it’s time to turn your ingredient list into an actual recipe! 🍲\n\nYour first step will be to describe the number of people being fed and the first ingredient to be added.\n\n<div class=\"c-project-code\">\n--- code ---\n---\nlanguage: python\nfilename: main.py\nline_numbers: true\nline_number_start: 21\nline_highlights: 22-23\n---\n# Print recipe instructions\nprint()\nprint(f'To make this revolting recipe for {servings} people add {amount_1 * servings}g of {ingredient_1} to a large bowl.')\n--- \/code ---\n<\/div>\n\n<div class=\"c-project-output\">\n<pre>To make this revolting recipe for 3 people add 150g of maggot mash 🐛 to a large bowl.<\/pre>\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--tip\">\n\n### Tip\n\nYou can do **maths inside an f-string**! \nThis lets you calculate the ingredient amounts and show them inside a sentence without needing extra lines of code.\n\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--debug\">\n\n### Debugging\n\n- Make sure you used `* servings` inside the `{}` for the amount\n- Don’t forget the `f` at the start of your string\n\n<\/div>\n"
},
{
"filename": "step_5.md",
"path": "en\/",
"content": "<h2 class=\"c-project-heading--task\">Finish your disgusting recipe<\/h2>\n--- task ---\nUse more f-strings to describe how to prepare your ingredients\n--- \/task ---\n\n<h2 class=\"c-project-heading--explainer\">Serve it up 🤢<\/h2>\n\nLet’s finish the recipe by printing the rest of the disgusting instructions.\n\nYou’ll describe:\n- What to pour in next\n- How to garnish it with sprinkles\n- How to serve it to your (un)lucky guests!\n\nAdd these final lines to your program:\n\n<div class=\"c-project-code\">\n--- code ---\n---\nlanguage: python\nfilename: main.py\nline_numbers: true\nline_number_start: 21\nline_highlights: 24-27\n---\n# Print recipe instructions\nprint()\nprint(f'To make this revolting recipe for {servings} people add {amount_1 * servings}g of {ingredient_1} to a large bowl.')\nprint()\nprint(f'Pour over {amount_2 * servings}ml of {ingredient_2}.')\nprint()\nprint(f'Sprinkle with {amount_3 * servings}g of {ingredient_3} and serve cold 🧊. Yum!')\n--- \/code ---\n<\/div>\n\n<div class=\"c-project-output\">\n<pre>To make this revolting recipe for 3 people add 150g of maggot mash 🐛 to a large bowl.\n\nPour over 90ml of sock juice 🧦.\n\nSprinkle with 30g of toenail sprinkles 🦶 and serve cold 🧊. Yum!<\/pre>\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--tip\">\n\n### Tip\n\nAdding `print()` with nothing in it is a great way to add blank lines in your output. \nYou can combine text, variables, and maths all in the same f-string!\n\n<\/div>\n\n<div class=\"c-project-callout c-project-callout--debug\">\n\n### Debugging\n\n- Check that every sentence is inside a `print(f'...')`\n- Watch your brackets and punctuation carefully!\n\n<\/div>\n"
},
{
"filename": "main.py",
"path": "en\/solutions\/",
"content": "# Gross Groceries recipe card\n\n# Ingredients and amounts for 1 person\n\ningredient_1 = 'maggot mash 🐛'\namount_1 = 50\n\ningredient_2 = 'sock juice 🧦'\namount_2 = 30\n\ningredient_3 = 'toenail sprinkles 🦶'\namount_3 = 10\n# Number of servings\nservings = 3\n\n# Scaled-up ingredients\nprint(f'{amount_1 * servings}g of {ingredient_1}')\nprint(f'{amount_2 * servings}ml of {ingredient_2}')\nprint(f'{amount_3 * servings}g of {ingredient_3}')\n\n# Print recipe instructions\nprint()\nprint(f'To make this revolting recipe for {servings} people add {amount_1 * servings}g of {ingredient_1} to a large bowl.')\nprint()\nprint(f'Pour over {amount_2 * servings}ml of {ingredient_2}.')\nprint()\nprint(f'Sprinkle with {amount_3 * servings}g of {ingredient_3} and serve cold 🧊. Yum!')\n"
},
{
"filename": "README.md",
"path": "python-bytes-gross-groceries\/",
"content": "# Python bytes - Gross groceries\n\n![A cartoon recipe card with gross ingredients like sock juice and toenail sprinkles](en\/images\/banner.png)\n\nProject description\n\nFind the project online at [projects.raspberrypi.org\/en\/projects\/python-bytes-gross-groceries](https:\/\/projects.raspberrypi.org\/en\/projects\/python-bytes-gross-groceries)\n\n## Resources\nFor project materials and solutions, see [en\/resources](https:\/\/github.com\/raspberrypilearning\/python-bytes-gross-groceries\/tree\/master\/en\/resources) and [en\/solutions](https:\/\/github.com\/raspberrypilearning\/python-bytes-gross-groceries\/tree\/master\/en\/solutions).\n\n## Contributing\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Licence\nSee [LICENCE.md](LICENCE.md)\n"
},
{
"filename": "CONTRIBUTING.md",
"path": "python-bytes-gross-groceries\/",
"content": "# Contributing\n\nAll contributions are assumed to be licensed under the same licence as the source, i.e. [CC BY-SA](http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/). This licence must remain in all derivatives of this work.\n\n## Issues\n\nIf you find a mistake, bug, or other problem, please [open an issue](https:\/\/github.com\/raspberrypilearning\/python-bytes-gross-groceries\/issues) in this repository.\n\n## Pull requests\n\nAll edits to a resource should be made to the draft branch or to a fork of the repo. These patches can then be submitted as a pull request.\n\nIf you fix a mistake, bug, or problem or have something to contribute, please create a pull request for each modification. Please consider grouping modifications sensibly, e.g. don't bundle typo fixes in the same pull request as code changes, file them separately instead.\n\nPlease note that sometimes things are done for pedagogical reasons so changes which make sense from a software engineering perspective (reducing duplication or making use of more advanced programming language features) may not be suitable to maintain the intended educational value.\n\n## Derivatives\n\nSee [LICENCE.md](LICENCE.md) for content licence. The licence must remain in all derivatives of this work.\n\n## Translation\n\nYou can help us make this project available to more people around the world by translating it. For more information, please go to [rpf.io\/translate](https:\/\/rpf.io\/translate).\n"
},
{
"filename": "LICENCE.md",
"path": "python-bytes-gross-groceries\/",
"content": "# Licence\n\nUnless otherwise specified, everything in this repository is covered by the following licence:\n\n[![Creative Commons licence](http:\/\/i.creativecommons.org\/l\/by-sa\/4.0\/88x31.png)](http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/)\n\n**Python bytes - Gross groceries** by the [Raspberry Pi Foundation](http:\/\/www.raspberrypi.org) is licensed under a [Creative Commons Attribution 4.0 International licence](http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/).\n\nBased on a work at https:\/\/github.com\/raspberrypilearning\/python-bytes-gross-groceries.\n"
},
{
"filename": "crowdin.yml",
"path": "python-bytes-gross-groceries\/",
"content": "files:\n - source: \/en\/**\/*.*\n translation: \/%locale%\/**\/%original_file_name%\n"
}
]
27 changes: 27 additions & 0 deletions de-DE/solutions/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Gross Groceries recipe card

# Ingredients and amounts for 1 person

ingredient_1 = 'maggot mash 🐛'
amount_1 = 50

ingredient_2 = 'sock juice 🧦'
amount_2 = 30

ingredient_3 = 'toenail sprinkles 🦶'
amount_3 = 10
# Number of servings
servings = 3

# Scaled-up ingredients
print(f'{amount_1 * servings}g of {ingredient_1}')
print(f'{amount_2 * servings}ml of {ingredient_2}')
print(f'{amount_3 * servings}g of {ingredient_3}')

# Print recipe instructions
print()
print(f'To make this revolting recipe for {servings} people add {amount_1 * servings}g of {ingredient_1} to a large bowl.')
print()
print(f'Pour over {amount_2 * servings}ml of {ingredient_2}.')
print()
print(f'Sprinkle with {amount_3 * servings}g of {ingredient_3} and serve cold 🧊. Yum!')
72 changes: 72 additions & 0 deletions de-DE/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<h2 class="c-project-heading--task">Write your first disgusting ingredient</h2>

\--- task ---

Add a gross ingredient and print it using an f-string.

\--- /task ---

<h2 class="c-project-heading--explainer">Start your recipe</h2>

The owner of an odd restaurant has decided to use code to help make their recipes. You're the coder they've hired. 🧑‍💻
Your job is to help create the grossest recipe card ever 🤢

Let’s start by adding your first ingredient. But before we write any code, you’ll notice some lines that start with `#` — these are **comments**.

Comments are notes in your code that help you (and others!) understand what each part does. Python ignores them when your program runs.

Now try this:

1. Choose a disgusting ingredient like `'maggot mash 🐛'` or `'slug slime 🐌'`.
2. Decide how much of it you want to use. Let’s say `50` grams.
3. Use an **f-string** to print the amount and the ingredient.

<div class="c-project-code">
--- code ---
---
language: python
filename: main.py
line_numbers: true
line_number_start: 3
line_highlights: 5-6,11
---

# Ingredients and amounts for 1 person

ingredient_1 = 'maggot mash 🐛'
amount_1 = 50

# Number of servings

# Scaled-up ingredients

print(f'{amount_1}g of {ingredient_1}')

\--- /code ---

</div>

<div class="c-project-output">
<pre>50g of maggot mash 🐛</pre>
</div>

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

### Tip

If your code prints nothing or shows an error, check that:

- You used **quotes** around your ingredient name (it's a string!)
- You’ve spelled the variable names correctly
- You used the `f` before the string in `print(f'...')`

</div>

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

### Debugging

- If Python says there's a `NameError`, you may have a typo in your variable name
- If you see `{amount_1}` in the output instead of the number, make sure your string starts with `f`

</div>
Loading