Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Build letter E | Challenges
New Script
course content

Kursinhalt

New Script

New Script

1. Basic Controls
2. Functions
3. Loops
4. If-Else Statements
5. Challenges

book
Challenge: Build letter E

Welcome to the "Build Letter E" challenge!

Let's recap the ninja methods and features you've learned:

Ninja Methods:

  • go_right(), go_left(), go_up(), go_down(): Move the ninja one cell in the specified direction.
  • pick_sushi(): Pick up sushi from the map and add it to your inventory.
  • put_sushi(): Place sushi from your inventory onto a cell.
  • object_up(), object_down(), object_right(), object_left(): Determine the object in the next cell in the specified direction, returning "wall", "sushi", or "empty".

Programming Concepts:

  • Functions: Create reusable blocks of code to perform specific tasks.
  • Decomposition: Break down complex problems into smaller, manageable parts.
  • Loops: Use for and while loops to repeat actions.
  • Conditional Statements: Use if-else statements to make decisions based on conditions.
Aufgabe

Swipe to start coding

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 5. Kapitel 2
py

ninja.py

html

index.html

py

preset.py

toggle bottom row

book
Challenge: Build letter E

Welcome to the "Build Letter E" challenge!

Let's recap the ninja methods and features you've learned:

Ninja Methods:

  • go_right(), go_left(), go_up(), go_down(): Move the ninja one cell in the specified direction.
  • pick_sushi(): Pick up sushi from the map and add it to your inventory.
  • put_sushi(): Place sushi from your inventory onto a cell.
  • object_up(), object_down(), object_right(), object_left(): Determine the object in the next cell in the specified direction, returning "wall", "sushi", or "empty".

Programming Concepts:

  • Functions: Create reusable blocks of code to perform specific tasks.
  • Decomposition: Break down complex problems into smaller, manageable parts.
  • Loops: Use for and while loops to repeat actions.
  • Conditional Statements: Use if-else statements to make decisions based on conditions.
Aufgabe

Swipe to start coding

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 5. Kapitel 2
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?
some-alt