Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Traverse Spiral | Challenges
Python Ninja (copy)

Pyyhkäise näyttääksesi valikon

book
Challenge: Traverse Spiral

Welcome to the "Traverse the Spiral" 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.

Tehtävä

Swipe to start coding

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 6. Luku 3
py

ninja.py

html

index.html

py

preset.py

Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?

Kysy tekoälyä

expand
ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

book
Challenge: Traverse Spiral

Welcome to the "Traverse the Spiral" 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.

Tehtävä

Swipe to start coding

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 6. Luku 3
Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?
some-alt