
Hello, checkiomates🐱👤!
This week in Python, we dive into effective strategies for optimizing your code's performance, explore the powerful combination of decorators and functional programming, and test your foundational knowledge with a quiz on control flow. Additionally, we present a fascinating mission: implementing the Cistercian number notation, a historical system used by monks, by converting modern integers into their unique medieval representations.
💡TIP
At your profile, after clicking on big percent number of your progress, you may see module and methods you have already used in your shared solutions. If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
🏁 MISSION
Cistercian Converter I: Integer To Cistercian by freeman_lex -
The Cistercian number-notation was invented in the late 13th century by Cistercian monks, near the border region between France and Belgium. For two centuries, the number system was used by monks belonging to the order across all of Europe as an alternative to the well-known Roman numerals and the ‘novel’ Hindu-Arabic numerals, the latter of which were just beginning to get adopted at the time. In the mission you are given an integer and you need to return the Cistercian number representation of this number.
cistercian(4) == [ [" ", " ", "0", " ", "0"], [" ", " ", "0", "0", " "], [" ", " ", "0", " ", " "], [" ", " ", "0", " ", " "], [" ", " ", "0", " ", " "], [" ", " ", "0", " ", " "], [" ", " ", "0", " ", " "], ] cistercian(50) == [ ["0", "0", "0", " ", " "], [" ", "0", "0", " ", " "], [" ", " ", "0", " ", " "], [" ", " ", "0", " ", " "], [" ", " ", "0", " ", " "], [" ", " ", "0", " ", " "], [" ", " ", "0", " ", " "], ]
📖 ARTICLES
Ways to Optimize Your Code in Python -
By optimizing Python code, you improve performance, reduce resource consumption, and enhance scalability. While Python is known for its simplicity and readability, these characteristics can sometimes come at the cost of efficiency. In this article, we'll explore four ways to optimize your Python project and improve performance.
Decorators and Functional programming -
In this article, the author is going to talk about key functional programming concepts implemented using Python decorators as practical examples to demonstrate their power and flexibility.
Control Flow Structures in Python Quiz -
In this quiz, you’ll test your understanding of control flow structures in Python. Control flow dictates the order in which your code executes, letting you make choices, repeat work, and handle exceptions to build more flexible, reliable programs.
👩💻CODE SHOT
What do you think the following code does?
def ???????(*A) -> int: while len(A) > 1: m = min(A) A = {a%m or m for a in A} return m
🙌 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! ⤵