Post image
Light Mode
Dark Mode
Python Breakthroughs: Chess, No-GIL, and Loops

Hello, checkiomatesđŸ±â€đŸ‘€!

This edition dives into Python’s latest advancements and challenges. Discover a clever Python solution that outperforms LinkedIn’s own N-Queens solver, explore the game-changing features of Python 3.13—including No-GIL, JIT, and iOS support—and test your knowledge with a quiz on while loops. Finally, tackle a fun mission with magic capsules, putting your problem-solving skills to the test.

💡TIP

On Easy difficulty, each of the few starting stations is dedicated to a distinct data type.
If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!

🏁 MISSION

Magic Capsules by freeman_lex -

Fan Chi'ih has brought magic capsules from China, each with a specific production cycle that produces a gold coin on the last day of the cycle. By activating all the capsules simultaneously, he wants to know how many days it takes to accumulate at least exact number of gold coins. You are given a needed number of gold goal and a sequence of capsules' cycles cycles.

num_days(12, [3, 7, 2]) == 14
num_days(100, [17, 13, 20, 10, 12, 16, 10, 13, 13, 10]) == 130
num_days(20, [1, 2, 3, 4, 5]) == 10

📖 ARTICLES

Beating LinkedIn “Queens” with Python -

This is a short account of how I wrote a program that solves all LQueens puzzles from LinkedIn automatically with Python.

Python 3.13 in 2025 Breakthroughs: No-GIL, JIT, and iOS Support Explained -

This article summarizes all the goodies in last fall’s Python 3.13 release, including No-GIL, JIT compilation, and iOS support. Find out how these changes effect Python development in 2025.

Python while Loops: Repeating Tasks Conditionally Quiz -

In this quiz, you’ll test your understanding of Python while Loops: Repeating Tasks Conditionally. The while keyword is used to initiate a loop that repeats a block of code while a condition is true. A while loop works by evaluating a condition at the start of each iteration. If the condition is true, then the loop executes. Otherwise, it terminates.

đŸ‘©â€đŸ’»CODE SHOT

How do you think, what the following code does?

from datetime import datetime


def ??????????(dt1str: str, dt2str: str) -> str:

    dt1obj, dt2obj = map(datetime.fromisoformat, (dt1str, dt2str))
    return max(dt2obj, dt1obj).isoformat()

🙌 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! —

Created: March 17, 2025, 6:22 p.m.
0
40
User avatar
freeman_lex