Post image
Light Mode
Dark Mode
Python's Logic & Labyrinths

Hello, checkiomatesπŸ±β€πŸ‘€!

Let's delve into the intricacies of designing and managing complex systems, explore a unique perspective on performance optimization with "the fifth kind of optimisation," and discover a vast collection of Python projects and learning resources. To top it off, we present a mathematical mission: playing with Kaprekar's routine, an iterative number theory algorithm that involves sorting digits and calculating differences.

πŸ’‘TIP

You may click on any mission tag and see all missions, where this tag is present!
If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!

🏁 MISSION

Kaprekar's algorithm by check-side -

In number theory, Kaprekar's routine is an iterative algorithm named after its inventor, Indian mathematician D. R. Kaprekar. Each iteration starts with a four-digit random number, sorts the digits into descending and ascending order, and calculates the difference between the two new numbers. In this mission you are going to play with these numbers finding out the result of operations.

kaprekar_algorithm(5914) == (6174, 3, True)
kaprekar_algorithm(48) == (27, 2, False)
kaprekar_algorithm(111) == (0, 1, None)

πŸ“– ARTICLES

Working on Complex Systems -

In this post, the author breaks down the very concept of complexity. Next, we take a step back to understand what makes certain environments rather complex than complicated and then explore patterns for navigating complex systems effectively.

The Fifth Kind of Optimisation -

Laurence Tratt arguing that parallelization should be considered a crucial fifth kind of optimization

The Big Book of Small Python Projects -

This curated collection of simple Python projects lets you dive right in and make digital art, games, animations, number-crunching tools and more – right away!

πŸ‘©β€πŸ’»CODE SHOT

What do you think the following code does?

def ???????(h: list[int]) -> int:
    result = min(h) * len(h)
    for w in range(1, len(h)):
        for i in range(len(h) - w + 1):
            result = max(result, min(h[i:i + w]) * w)
    return result

πŸ™Œ 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: May 26, 2025, 5:14 p.m.
0
40
User avatar
freeman_lex