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
2 changes: 1 addition & 1 deletion fr-FR/code/complete/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ def roule_de():
print(f'{111111111 * 111111111}')
print(f'La date et l\'heure sont {datetime.now()}')
roule_de() # Appel la fonction lancer de dés
print(f'J\'❤️ ...')
print(f"J'❤️ ...")
print(f'... me rend 😃')
print(f'Je voudrais faire ... avec {python}')
1 change: 0 additions & 1 deletion fr-FR/code/complete/project_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: "Bonjour 🌍🌎🌏"
identifier: "editor-hello-world-complete"
type: 'python'
build: true
10 changes: 5 additions & 5 deletions fr-FR/code/starter/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# importations
# imports

# variables
monde = '🌍🌎🌏'
world = '🌍🌎🌏'
python = 'Python 🐍'
feu = '🔥'
fire = '🔥'

# Définitions de fonctions
# Function definitions

# Mettre le code à exécuter ci-dessous
# Put code to run under here

1 change: 0 additions & 1 deletion fr-FR/code/starter/project_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: "Bonjour 🌍🌎🌏"
identifier: "editor-hello-world-starter"
type: 'python'
build: true
Binary file modified fr-FR/images/run_hello_world.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions fr-FR/landing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Write an interactive program in Python that uses emojis 🙌 🙌🏼 🙌🏽 🙌🏾 🙌🏿.

\--- print-only ---

![Completed project showing example code on the code editor](images/showcase_static.png){:width="640px"}

\--- /print-only ---

\--- no-print ---

<div style="display: flex; flex-wrap: wrap">
<div style="flex-basis: 175px; flex-grow: 1">

Click on the **Run** button

<iframe src="https://editor.raspberrypi.org/en/embed/viewer/hello-world-solution" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen>
</iframe>
</div>
</div>

\--- /no-print ---

61 changes: 35 additions & 26 deletions fr-FR/meta.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,49 @@
---
title: "Editeur Bonjour \U0001F30D\U0001F30E\U0001F30F"
hero_image: images/banner.png
description: Écris un projet Python interactif qui utilise des emojis
meta_title: Projets de codage Python pour enfants et adolescent·e·s | Bonjour le monde
meta_description: Apprends Python avec la Raspberry Pi Foundation. Crée un projet de codage Python interactif qui utilise des emojis.
version: 4
listed: false
listed: true
copyedit: false
landing: true
last_tested: "2021-10-06"
steps:
- title: step 1
- title: step 2
-
title: step 1
-
title: step 2
completion:
- engaged
- title: step 3
- title: step 4
- title: step 5
- title: step 6
- title: step 7
- title: step 8
- title: step 9
- title: step 10
- title: step 11
- title: step 12
- title: step 13
- title: step 14
- title: step 15
- title: step 16
-
title: step 3
-
title: step 4
-
title: step 5
-
title: step 6
-
title: step 7
-
title: step 8
-
title: step 9
-
title: step 10
-
title: step 11
-
title: step 12
-
title: step 13
-
title: step 14
-
title: step 15
-
title: step 16
completion:
- internal
- title: step 17
knowledge_quiz:
path: quiz1
version: 1
questions: 3
passing_score: 3
- title: step 18
completion:
- external

30 changes: 15 additions & 15 deletions fr-FR/step_1.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<h2 class="c-project-heading--task">Print Bonjour</h2>
<h2 class="c-project-heading--task">Print Hello</h2>

--- task ---
\--- task ---

➡️ Afficher le mot 'Bonjour' sur l'écran
➡️ Display the word 'Hello' on the screen

--- /task ---
\--- /task ---

En Python, `print()` affiche des chaînes (mots ou nombres) à l'écran.
In Python, `print()` outputs strings (words or numbers) to the screen.

Tape le code pour `print()` (imprimer) Bonjour à l'écran :
Type the code to `print()` Hello to the screen:

<div class="c-project-code">

Expand All @@ -20,35 +20,35 @@ line_number_start: 10
line_highlights: 11
---

# Mettre le code à exécuter ci-dessous.
print(f'Bonjour ')
# Put code to run under here.
print(f'Hello')

--- /code ---

</div>

**Test :** clique sur le bouton **Exécuter**.
Tu devrais voir ceci lorsque tu exécutes ton code .
**Test:** Click the **Run** button.
This is what you should see when you run your code.

<div class="c-project-output">
```
Bonjour
Hello
```
</div>

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

### Astuce

Lorsque tu tapes une parenthèse ouvrante `(` , le Code Editor ajoutera automatiquement une parenthèse fermante `)`
Cela se produit également lorsque tu tapes une apostrophe ouvrante `'`.
When you type an opening bracket `(` the code editor will automatically add a closing bracket `)`
This also happens when you type an opening apostrophe `'`.

</div>

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

### Déboguer
### Debugging

Si tu obtiens une erreur, vérifie ton code très attentivement. Vérifie qu'il y a des guillemets simples autour de `Bonjour` afin que Python sache qu'il s'agit de texte.
If you get an error then check your code really carefully. Check there are single quotes around `Hello` so Python knows it is meant to be text.

</div>
40 changes: 20 additions & 20 deletions fr-FR/step_10.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h2 class="c-project-heading--task">Lancer un dé</h2>

--- task ---
\--- task ---

➡️ Créer une fonction pour simuler le lancement d'un dé.

➡️ Appeler la fonction pour exécuter le code qu'elle contient.

--- /task ---
\--- /task ---

Crée une fonction appelée `roule_de()`, qui imprime le nombre 4.

Expand All @@ -18,15 +18,15 @@ line_number_start: 9
line_highlights: 10, 11
---

# Définitions de fonctions
def roule_de():
print(f'Tu as obtenu un {4}')

# Mettre le code à exécuter ci-dessous
# Function definitions
def roll_dice():
print(f'You rolled a {4}')
# Put code to run under here

--- /code ---

Ensuite, appelle la fonction en bas de ton code.
Then, call the function at the bottom of your code.

--- code ---
---
Expand All @@ -35,37 +35,37 @@ line_numbers: true
line_number_start: 18
line_highlights: 19
---
print(f'La date et l'heure sont {datetime.now()}')
roule_de()
print(f'The date and time is {datetime.now()}')
roll_dice()

--- /code ---

**Test :** clique sur le bouton **Exécuter**.
Tu devrais voir ceci lorsque tu exécutes ton code.
**Test:** Click the **Run** button.
This is what you should see when you run your code.

<div class="c-project-output">
```
Bonjour 🌍🌎🌏
Bienvenue sur Python 🐍
Python 🐍 est bon en maths !
Hello 🌍🌎🌏
Welcome to Python 🐍
Python 🐍 is good at maths!
12345678987654321
La date et l'heure sont 2023-11-21 15:55:33.038000
Tu as obtenu un 4
The date and time is 2023-11-21 15:55:33.038000
You rolled a 4
```
</div>

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

### Astuce

Tu peux utiliser la touche **Tab** de ton clavier pour insérer 4 espaces. Appuyer sur **Maj** et **Tab** supprimera les 4 espaces.
You can use the **Tab** key on your keyboard to insert 4 spaces. Pressing **Shift** and **Tab** will remove the 4 spaces.

</div>

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

### Déboguer
### Debugging

Vérifie que tu as des parenthèses `()` et deux points `:` à la fin de ta définition de fonction. Vérifie également que tu utilises des parenthèses `()` lorsque tu appelles ta fonction.
Check that you have brackets `()` and a colon `:` at the end of your function definition. Also check you are using brackets `()` when you call your function.

</div>
8 changes: 4 additions & 4 deletions fr-FR/step_11.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<h2 class="c-project-heading--task">Importer randint</h2>

--- task ---
\--- task ---

➡️ Importer la fonction `randint` depuis le module `random`.

--- /task ---
\--- /task ---

Un autre module appelé `random` peut être utilisé pour créer des nombres aléatoires

Expand All @@ -16,11 +16,11 @@ line_number_start: 1
line_highlights: 3
---

# importations
# imports
from datetime import datetime
from random import randint

--- /code ---

Le résultat de ton code restera identique à chaque exécution.
Your code output will not change when you run it.

32 changes: 16 additions & 16 deletions fr-FR/step_12.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<h2 class="c-project-heading--task">Nombres aléatoires</h2>

--- task ---
\--- task ---

➡️ Choisir un nombre aléatoire pour le lancer de dés.

--- /task ---
\--- /task ---

Utilise la fonction `randint` que tu as importée pour choisir un nombre aléatoire entre 1 et 6 pour le lancer de dés.

Expand All @@ -16,38 +16,38 @@ line_number_start: 10
line_highlights: 12
---

# Définitions de fonctions
def roule_de():
print(f'Tu as obtenu un {randint(1, 6)}')

# Function definitions
def roll_dice():
print(f'You rolled a {randint(1, 6)}')
--- /code ---

**Test :** clique sur le bouton **Exécuter**.
Maintenant, lorsque tu exécutes ton code, un nouveau nombre aléatoire entre 1 et 6 sera choisi à chaque fois.
**Test:** Click the **Run** button.
Now when you run your code, a new random number between 1 and 6 will be chosen each time.

<div class="c-project-output">
```
Bonjour 🌍🌎🌏
Bienvenue sur Python 🐍
Python 🐍 est bon en maths !
Hello 🌍🌎🌏
Welcome to Python 🐍
Python 🐍 is good at maths!
12345678987654321
La date et l'heure sont 2023-11-21 16:02:12.535000
Tu as obtenu un 6
The date and time is 2023-11-21 16:02:12.535000
You rolled a 6
```
</div>

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

### Astuce

`randint` est l'abréviation d'entier aléatoire. Les entiers sont des nombres entiers.
`randint` is short for random integer. Integers are whole numbers.

</div>

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

### Déboguer
### Debugging

Vérifie tes parenthèses et accolades si tu obtiens une erreur. Note que le même nombre peut être choisi plusieurs fois. C'est aléatoire !
Check your brackets and curly brackets if you get and error. Take note that the same number might be chosen over and over again. It's random!

</div>
Loading