• Check and Mate! ♟️


Hello CheckiO users! 🙂

The chess community was pleasantly surprised by the recently released miniseries “The Queen’s Gambit” ♛ that turned out to be very realistic. The success of this show about a talented chess player was so consuming that we’ve also wanted to draw your attention to a few great missions related to this topic. So, please, enjoy the game!

The first mission is called Pawn Brotherhood where your task is to count how many white pawns are safe on the chess board.

safe_pawns({"b4", "d4", "f4", "c3", "e3", "g5", "d2"}) == 6
safe_pawns({"b4", "c4", "d4", "e4", "f4", "g4", "e5"}) == 1

The second one is Chess Knight where you must write a function that can find all of the chessboard cells to which the Knight can move.

chess_knight('a1', 1) == ['b3', 'c2']
chess_knight('h8', 2) == ['d6', 'd8', 'e5', 'e7', 'f4', 'f7', 'f8', 'g5', 'g6', 'h4', 'h6', 'h8']

The third is The Shortest Knight's Path in which you have to find the length of the shortest path for the knight from one point to another on the chessboard.

checkio("b1-d5") == 2, "First"
checkio("a6-b8") == 1, "Second"
checkio("h1-g2") == 4, "Third"
checkio("h8-d7") == 3, "Fourth"
checkio("a1-h8") == 6, "Fifth"

The fourth mission is called Place Queens where you need to place eight chess Queens on an 8×8 chessboard so that no two Queens threaten each other.

place_queens({"b2", "c4", "d6", "e8"})  # {"b2", "c4", "d6", "e8", "a5", "f3", "g1", "h7"},
place_queens({"b2", "c4", "d6", "e8", "a7", "g5"}) == set()

👉 The previous mission was: House of Mirrors. Check out the leaderboard, which should be open if you have solved it, and find out which solution was the best!

🚩 Another great thing worth mentioning is that we’ve added a graphlib module supported by Python 3.9 on CheckiO which will allow you to operate with graph-like structures. Take full use of this amazing module when solving new tasks!

    💡 Highlights from the world of Python:
  • More than 1000 Python course slides! If you are teaching Python, those can be very useful for you, and if you are just starting to learn this amazing programming language, then checking these ones can actually be the fastest way to do so.
  • Go through the 73 Examples to Help You Master Python's f-strings. The examples will be completely guided by the elaborate explanations. Knowing how to make the most out of f-string can make your life so much easier, which is why it might be extremely useful to learn the most common tricks!
  • If you are with us, then you’re definitely one of the lucky many who use Python and want to up their game or the other lucky many who want to learn Python. That is why you must check out the 25 Best GitHub Repos for Python Developers. They are very helpful!
  • You want to write a great Dockerfile for Python apps? Learn 6 things to really improve your Dockerfiles, which are: setting env variables and a working directory, changing the default user to non-root, correctly forwarding signals to your application, avoiding invalidating the Docker cache, updating pip, setuptools and wheel, and taking care of zombie processes. All with great examples!

🏋 The users who’ve made the TOP 3 this month are veky, PetrStar, and 2010min0ru. You are doing great, guys! Keep on coding!

Welcome to CheckiO - games for coders where you can improve your codings skills.

The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.

Join the Game