 Challenge: Build letter E
Challenge: Build letter E
Welcome to the "Build Letter E" challenge!
Let's recap the ninja methods and features you've learned:
Ninja Methods:
- goRight(),- goLeft(),- goUp(),- goDown(): Move the ninja one cell in the specified direction.
- pickSushi(): Pick up sushi from the map and add it to your inventory.
- putSushi(): Place sushi from your inventory onto a cell.
- objectUp(),- objectDown(),- objectRight(),- objectLeft(): 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 forandwhileloops to repeat actions.
- Conditional Statements: Use if-elsestatements to make decisions based on conditions.
Uppgift
Swipe to start coding
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 5. Kapitel 2
ninja.js
index.html
preset.js
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Suggested prompts:
Sammanfatta detta kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 3.57 Challenge: Build letter E
Challenge: Build letter E
Svep för att visa menyn
Welcome to the "Build Letter E" challenge!
Let's recap the ninja methods and features you've learned:
Ninja Methods:
- goRight(),- goLeft(),- goUp(),- goDown(): Move the ninja one cell in the specified direction.
- pickSushi(): Pick up sushi from the map and add it to your inventory.
- putSushi(): Place sushi from your inventory onto a cell.
- objectUp(),- objectDown(),- objectRight(),- objectLeft(): 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 forandwhileloops to repeat actions.
- Conditional Statements: Use if-elsestatements to make decisions based on conditions.
Uppgift
Swipe to start coding
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 5. Kapitel 2
ninja.js
index.html
preset.js