-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from raspberrypilearning/draft
Update translation
- Loading branch information
Showing
44 changed files
with
645 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/bin/python3 | ||
|
||
# Bibliotheekcode importeren | ||
from p5 import * | ||
from random import randint | ||
|
||
# Global variabelen instellen | ||
scherm_grootte = 400 | ||
raket_y = 400 | ||
verbruik = 100 | ||
omloopbaan_straal = 250 | ||
omloopbaan_y = scherm_grootte - omloopbaan_straal | ||
|
||
|
||
# De teken_raket functie komt hier | ||
def teken_raket(): | ||
global raket_y, brandstof, verbruik | ||
|
||
if brandstof >= verbruik and raket_y > omloopbaan_y: | ||
raket_y -= 1 | ||
brandstof -= verbruik | ||
print('Brandstof over: ', brandstof) | ||
|
||
no_stroke() | ||
|
||
for i in range(25): | ||
fill(255, 255 - i * 10, 0) | ||
ellipse(width/2, raket_y + i, 8, 3) | ||
|
||
fill(200, 200, 200, 100) # Transparant grijs | ||
for i in range(20): # Teken 20 willekeurige rook ellipsen | ||
ellipse(width/2 + randint(-5, 5), raket_y + | ||
randint(20, 50), randint(5, 10), randint(5, 10)) | ||
|
||
if brandstof < verbruik and raket_y > omloopbaan_y: | ||
tint(255, 0, 0) | ||
elif brandstof < 1000 and raket_y <= omloopbaan_y: | ||
tint(0, 255, 0) | ||
elif brandstof >= 1000 and raket_y <= omloopbaan_y: | ||
tint(255, 200, 0) | ||
|
||
image(raket, width/2, height/2, 64, 64) | ||
no_tint() | ||
|
||
|
||
# De functie teken_achtergrond komt hier | ||
def teken_achtergrond(): | ||
background(0) | ||
image(planeet, width/2, height, 300, 300) | ||
|
||
no_fill() | ||
stroke(255) | ||
stroke_weight(2) | ||
ellipse(width/2, height, omloopbaan_straal * 2, omloopbaan_straal * 2) | ||
|
||
|
||
def setup(): | ||
# Stel hier je animatie in | ||
size(scherm_grootte, scherm_grootte) | ||
image_mode(CENTER) | ||
global planeet, raket | ||
planeet = load_image('planet.png') | ||
raket = load_image('rocket.png') | ||
|
||
|
||
def draw(): | ||
# Dingen om te doen in elk frame | ||
teken_achtergrond() | ||
teken_raket() | ||
|
||
|
||
brandstof = int(input('Hoeveel kilogram brandstof wil je gebruiken?')) | ||
run() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: 'Voorbeeld van Raket lancering' | ||
identifier: 'rocket-launch-example' | ||
type: 'python' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/python3 | ||
|
||
# Bibliotheekcode importeren | ||
from p5 import * | ||
from random import randint | ||
|
||
# Globale variabelen instellen | ||
|
||
|
||
# De teken_raket functie komt hier | ||
|
||
|
||
|
||
# De functie teken_achtergrond komt hier | ||
|
||
|
||
|
||
def setup(): | ||
# Stel hier je animatie in | ||
|
||
|
||
|
||
def draw(): | ||
# Dingen om te doen in elk frame | ||
|
||
|
||
|
||
run() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: "Raket lancering" | ||
identifier: 'rocket-launch-starter' | ||
type: 'python' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/bin/python3 | ||
|
||
# Bibliotheekcode importeren | ||
from p5 import * | ||
from random import randint | ||
|
||
# Globale variabelen instellen | ||
scherm_grootte = 400 | ||
raket_y = scherm_grootte # begin onderaan | ||
verbruik = 100 # hoeveel brandstof wordt er in elk frame verbruikt | ||
omloopbaan_straal = 250 | ||
omloopbaan_y = scherm_grootte - omloopbaan_straal | ||
hoge_omloopbaan_straal = 350 | ||
hoge_omloopbaan_y = scherm_grootte - hoge_omloopbaan_straal | ||
snelheid = 1 # Hoe ver de raket elk frame vliegt | ||
|
||
# De teken_raket functie komt hier | ||
|
||
|
||
def teken_raket(): | ||
global raket_y, brandstof, verbruik | ||
|
||
if brandstof >= verbruik and raket_y > hoge_omloopbaan_y: # vliegt nog steeds | ||
raket_y -= snelheid # Verplaats de raket | ||
brandstof -= verbruik # brandstof verbruik | ||
print('Brandstof over: ', brandstof) | ||
|
||
no_stroke() # Zet de lijn uit | ||
|
||
for i in range(25): # teken 25 brandende uitstoot ellipsen | ||
fill(255, 255 - i*10, 0) # geel | ||
# i neemt toe elke keer dat de lus wordt herhaald | ||
ellipse(width/2, raket_y + i, 8, 3) | ||
|
||
fill(200, 200, 200, 100) # Transparant grijs | ||
|
||
for i in range(20): # Teken 20 willekeurige rook ellipsen | ||
ellipse(width/2 + randint(-5, 5), raket_y + | ||
randint(20, 50), randint(5, 10), randint(5, 10)) | ||
|
||
if brandstof < verbruik and raket_y > omloopbaan_y: # Geen brandstof meer en niet in een omloopbaan | ||
tint(255, 0, 0) # Mislukt | ||
elif raket_y <= orbit_y and raket_y > high_orbit_y: | ||
tint(0, 255, 0) # Gelukt | ||
elif brandstof < 1000 and raket_y <= omloopbaan_y: | ||
tint(0, 100, 200) # Succes met hoge baan | ||
elif brandstof >= 1000 and raket_y <= omloopbaan_y: | ||
tint(255, 200, 0) # Te veel brandstof | ||
|
||
image(raket, width/2, height/2, 64, 64) | ||
no_tint() | ||
|
||
|
||
# De functie teken_achtergrond komt hier | ||
def teken_achtergrond(): | ||
achtergrond(0) # afkorting voor achtergrond(0, 0, 0) - zwart | ||
image(planeet, width/2, height, 300, 300) # teken de afbeelding | ||
|
||
# Teken de onderste baan | ||
no_fill() # Zet elke vulling uit | ||
stroke(255) # Stel een witte lijn in | ||
stroke_weight(2) | ||
ellipse(width/2, height, omloopbaan_straal*2, omloopbaan_straal*2) | ||
|
||
# Teken de hogere baan | ||
stroke(0, 100, 200) # Stel een blauwachtige streek in | ||
stroke_weight(2) | ||
ellipse(width/2, height, omloopbaan_straal*2, omloopbaan_straal*2) | ||
|
||
|
||
def setup(): | ||
# Stel hier je animatie in | ||
size(scherm_grootte, scherm_grootte) | ||
image_mode(CENTER) | ||
global planeet, raket | ||
planeet = load_image('planet.png') # jouw gekozen planeet | ||
raket = load_image('rocket.png') | ||
|
||
|
||
def draw(): | ||
# Dingen om te doen in elk frame | ||
teken_achtergrond() | ||
teken_raket() | ||
|
||
|
||
brandstof = int(input('Hoeveel kilogram brandstof wil je gebruiken?')) | ||
verbruik = int(input('Hoeveel brandstof moet de raket per frame verbruiken?')) | ||
snelheid = int(input('Hoe ver moet de raket per frame reizen?')) | ||
run() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: 'Upgrade van Raket Lancering' | ||
identifier: 'rocket-launch-upgrade' | ||
type: 'python' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
--- | ||
title: Raket lancering | ||
hero_image: images/banner.png | ||
description: Maak een animatie van een raket die een satelliet in een baan om de aarde | ||
brengt | ||
description: Maak een animatie van een raket die een satelliet in een baan om de aarde brengt | ||
meta_title: Python programmeer projecten voor kinderen en tieners | Raket lancering | ||
meta_description: Leer Python met de codeerprojecten van de Raspberry Pi Foundation voor kinderen en tieners. Maak een Python-animatie waarin een raket een satelliet in een baan om de aarde lanceert. | ||
version: 0.0.1 | ||
listed: true | ||
copyedit: true | ||
last_tested: '2021-10-06' | ||
last_tested: "2021-10-06" | ||
steps: | ||
- title: Inleiding | ||
- title: Het opzetten van de scene | ||
- title: Lancering! | ||
completion: | ||
- engaged | ||
- title: Uitlaat effecten | ||
- title: Brandstof verbruik | ||
- title: Omloopbaan bereiken | ||
completion: | ||
- internal | ||
- title: Reflectie | ||
knowledge_quiz: | ||
path: quiz1 | ||
version: 1 | ||
questions: 3 | ||
passing_score: 3 | ||
completion: | ||
- external | ||
- title: Verbeter je project | ||
- title: Wat kun je verder nog doen? | ||
- title: Wat ga je maken | ||
- title: Het opzetten van de scene | ||
- title: Lancering! | ||
completion: | ||
- engaged | ||
- title: Uitlaat effecten | ||
- title: Brandstof verbruik | ||
- title: Omloopbaan bereiken | ||
completion: | ||
- internal | ||
- title: Snelle quiz | ||
knowledge_quiz: | ||
path: quiz1 | ||
version: 1 | ||
questions: 3 | ||
passing_score: 3 | ||
completion: | ||
- external | ||
- title: Verbeter je project | ||
- title: Wat kun je verder nog doen? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
Global variabelen instellen | ||
|
||
Stel hier je animatie in | ||
|
||
Plaatst de afbeelding in het midden | ||
|
||
Jouw gekozen planeet | ||
|
||
De functie teken_achtergrond komt hier | ||
|
||
Afkorting voor background(0, 0, 0) - zwart | ||
|
||
Teken de afbeelding | ||
|
||
Dingen om te doen in elk frame | ||
|
||
De teken_raket functie komt hier | ||
|
||
Begin onderaan | ||
|
||
Gebruik de global raket_y variabele | ||
|
||
Verplaats de raket | ||
|
||
Zet de lijn uit | ||
|
||
Teken 25 brandende uitstoot ellipsen | ||
|
||
Geel | ||
|
||
i neemt toe elke keer dat de lus wordt herhaald | ||
|
||
Verminder de hoeveelheid groen | ||
|
||
Transparant grijs | ||
|
||
Teken 20 willekeurige rook ellipsen | ||
|
||
Hoeveel brandstof wordt er in elk frame verbruikt | ||
|
||
Hoeveel kilogram brandstof wil je gebruiken? | ||
|
||
Brandstof verbruik | ||
|
||
Brandstof over: | ||
|
||
Nog genoeg brandstof | ||
|
||
Zet de lijn uit | ||
|
||
Stel een witte lijn in | ||
|
||
Vliegt nog steeds | ||
|
||
Geen brandstof meer en niet in een omloopbaan | ||
|
||
Mislukt | ||
|
||
Dus de planeet is niet rood gekleurd in het volgende frame! | ||
|
||
Gelukt | ||
|
||
Te veel brandstof | ||
|
||
Lus | ||
|
||
Groen | ||
|
||
Amber | ||
|
||
Rood | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
scherm_grootte | ||
|
||
planeet | ||
|
||
teken_achtergrond | ||
|
||
raket | ||
|
||
raket_y | ||
|
||
teken_raket | ||
|
||
verbruik | ||
|
||
brandstof | ||
|
||
omloopbaan_straal | ||
|
||
omloopbaan_y | ||
|
||
punten | ||
|
||
levens | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.