Hello, checkiomates🐱👤!
This week, we explore The Law of PEP 8 Complaints for better code style, test your knowledge with a quiz on Python 3.14 error messages, and take a "taste test" of new language features. Our complex mission challenges you to use a pathfinding algorithm (like Dijkstra’s) to find the minimum delivery time for a robot on a grid with special teleporting boxes.
💡TIP
We allow users to assign hotkeys to "Run Code", "Check Solution" and stop code. You may see current combinations on buttons and change them in editor menu. If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
🏁 MISSION
Express Delivery by bryukh -
This coding task involves minimum-time pathfinding for a robot, Stephan, to deliver cargo from a start ('S') to an end ('E') on a grid map with obstacles ('W'). The core mechanic is a system of teleporting boxes ('B'): placing cargo in one allows instant retrieval from any other. The solution must use a pathfinding algorithm (like Dijkstra's) to find the fastest route, accounting for the non-uniform time costs: 2 minutes for a loaded move, 1 minute for an unloaded move, and 1 minute for loading/unloading at a box. The state space for the algorithm must track both the robot's location and whether it is carrying the cargo.
checkio(["S...","....","B.WB","..WE"]) == "RRRDDD" checkio(["S...","....","B..B","..WE"]) == "DDBRRRBD"
📖 ARTICLES
PEP 8 outlines the preferred coding style for Python. It often gets wielded as a cudgel in online conversations. This post talks about what PEP 8 says and where it often gets ignored.
What is "good taste" in software engineering? -
This opinion piece talks about the difference between skill and taste when writing software. What “clean code” means to one may not be the same as to others.
Python 3.14 Preview: Better Syntax Error Messages Quiz -
This quiz helps you get familiar with the upgraded error messages in Python 3.14. You’ll review new keyword typo suggestions, improved math errors, string prefix feedback, and more.
👩💻CODE SHOT
What do you think the following code does?
def checkio(values: set, one: int) -> int:
return min(values, key=lambda k: (abs(k-one), k))
🙌 Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! ⤵
