Zigzag Path
When solving Ninja game tasks, do not start by writing every command one by one.
Instead, look for patterns:
- Does the Ninja repeat the same sequence of actions?
- Do similar movements and pickups appear in multiple places?
If so, that repeated sequence is a good candidate for a function.

If you want to get a hint about how the custom loot_zig_zag function may work, click the button above.
Thanks for your feedback!
ninja.py
Zigzag Path
Swipe to show menu
When solving Ninja game tasks, do not start by writing every command one by one.
Instead, look for patterns:
- Does the Ninja repeat the same sequence of actions?
- Do similar movements and pickups appear in multiple places?
If so, that repeated sequence is a good candidate for a function.

If you want to get a hint about how the custom loot_zig_zag function may work, click the button above.
Swipe to start coding
Solution
Explore other courses in Catalog
Thanks for your feedback!
ninja.py
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat