Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Align two columns | Challenges
New Script JS

Glissez pour afficher le menu

book
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 for and while loops to repeat actions.

  • Conditional Statements: Use if-else statements to make decisions based on conditions.

Tâche

Swipe to start coding

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 5. Chapitre 4
js

ninja.js

html

index.html

js

preset.js

Nous sommes désolés de vous informer que quelque chose s'est mal passé. Qu'est-il arrivé ?

Demandez à l'IA

expand
ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

book
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 for and while loops to repeat actions.

  • Conditional Statements: Use if-else statements to make decisions based on conditions.

Tâche

Swipe to start coding

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 5. Chapitre 4
Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Nous sommes désolés de vous informer que quelque chose s'est mal passé. Qu'est-il arrivé ?
some-alt