Challenge: Build letter E
Welcome to the "Build Letter E" challenge!
Let's recap the knight methods and features you've learned:
Knight Methods:
go_right(),go_left(),go_up(),go_down(): Move the knight one cell in the specified direction.pick_coin(): Pick up coin from the map and add it to your inventory.put_coin(): Place coin 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", "coin", 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
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 2
knight.py
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain the goal of the "Build Letter E" challenge?
What are the rules or constraints for building the letter E?
Can you give an example of how to use these knight methods in a function?
Awesome!
Completion rate improved to 2.94
Challenge: Build letter E
Swipe to show menu
Welcome to the "Build Letter E" challenge!
Let's recap the knight methods and features you've learned:
Knight Methods:
go_right(),go_left(),go_up(),go_down(): Move the knight one cell in the specified direction.pick_coin(): Pick up coin from the map and add it to your inventory.put_coin(): Place coin 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", "coin", 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
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 2
knight.py