Challenge: Align two columns
Welcome to the "Align Two Columns" 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.
Task
Swipe to start coding
Solution
Explore other courses in Catalog
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 4
ninja.js
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain what the "Align Two Columns" challenge is about?
Can you give an example of how to use these ninja methods in a solution?
What is the goal or objective I need to achieve in this challenge?
Awesome!
Completion rate improved to 3.57
Challenge: Align two columns
Swipe to show menu
Welcome to the "Align Two Columns" 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.
Task
Swipe to start coding
Solution
Explore other courses in Catalog
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 4
ninja.js