Hello, checkiomates🐱👤!
This week's Python digest we revisit the elegant enumerate() function for enhanced iteration, then weigh the strategic choice between Flask and Django for your next web project. Looking forward, we examine the insights from PyCon US on AI's influence and the future of programming. To challenge your algorithmic thinking, we present a board game mission to predict the final stone's color on a dynamically filled grid.
💡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
Stones Placing by freeman_lex -
The Master created a board game that consists of filling a rectangular (not necessary square) board with white and black stones. The cells in the first row and first column are randomly filled with white (0) or black (1) stones. The remaining cells are filled according to the rule that the color of a cell depends on the color of the three cells adjacent to it (top, left, top-left): if there are more white stones than black stones, the cell is filled with a white stone, and vice versa. You are given the first row and column and your program must calculate the color of the stone in the bottom right cell.
stones_placing([0, 0, 1, 0, 0, 0], [0, 1, 0, 0, 1, 1]) == 0 stones_placing([0, 1, 0], [0, 1, 1]) == 1 stones_placing([0, 0, 1, 0, 0], [0, 1, 0, 0, 1, 1]) == 0
📖 ARTICLES
Python enumerate(): Simplify Loops That Need Counters -
Learn how to simplify your loops with Python’s enumerate(). This tutorial shows you how to pair items with their index cleanly and effectively using real-world examples.
Flask or Django: Which One Best Fits Your Python Project? -
Choosing the right framework can significantly impact the success of a dev project. If you've chosen to use Python for your project's backend, you might need to decide between Flask and Django, the most popular web frameworks in the Python ecosystem. This article will help you determine which of the two best suits your specific needs by examining the key factors to consider.
Will AI Replace Junior Developers? I Asked Experts at Pycon US -
At PyCon US this year, Adarsh chatted with various Python folks about one big question: will AI replace junior developers? He spoke with Guido van Rossum, Anthony Shaw, Simon Willison, and others.
👩💻CODE SHOT
What do you think the following code does?
def checkio(*args):
return len(args) and max(args) - min(args)
🙌 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! ⤵
