• Old-but-gold missions, List vs Tuples, Simple vs Complex

Hello, checkiomates🐱‍👤!

This week we are going to offer you three new articles as usual. Also we want to attract your attention to three existed missions at CheckiO. They are interesting and remastered recently! You may already solved them...if not - don't waste your time!

🏁 MISSIONS:

Ryerson Letter Grade - Given the grade percentage for the course, calculate and return the letter grade that would appear in the Ryerson’s grade transcript

ryerson_letter_grade(45) == "F"
ryerson_letter_grade(62) == "C-"

Moore Neighbourhood by bryukh - For some games, it is important to know the conditions of neighbouring cells for chip (figure, draught, checker, etc) placement and strategy.

count_neighbours(((1, 0, 0, 1, 0),
                  (0, 1, 0, 0, 0),
                  (0, 0, 1, 0, 1),
                  (1, 0, 0, 0, 0),
                  (0, 0, 1, 0, 0),), 1, 2) == 3
count_neighbours(((1, 0, 0, 1, 0),
                  (0, 1, 0, 0, 0),
                  (0, 0, 1, 0, 1),
                  (1, 0, 0, 0, 0),
                  (0, 0, 1, 0, 0),), 0, 0) == 1

Golden Pyramid by bryukh - Consider a tuple of tuples in which the first tuple has one integer and each consecutive tuple has one more integer then the last. Such a tuple of tuples would look like a triangle. You should write a program that will find the highest possible sum on the most profitable route down the pyramid. All routes down the pyramid involve stepping down and to the left or down and to the right.

count_gold((
    (1,),
    (2, 3),
    (3, 3, 1),
    (3, 1, 5, 4),
    (3, 1, 3, 1, 3),
    (2, 2, 2, 2, 2, 2),
    (5, 6, 4, 5, 6, 4, 3)
)) == 23
count_gold((
    (9,),
    (2, 2),
    (3, 3, 3),
    (4, 4, 4, 4)
)) == 18

Now, it's time to refill our brains with some new info and knowledge.

💡ARTICLES:

1️⃣ Simplicity is An Advantage but Sadly Complexity Sells Better -
Simple is better than complex. But complex is better than complicated... Remember these words? This article will help you to determine, when simple solution is quite enough for your project!

✌ Python's "in" and "not in" Operators -
Membership tests allow you to check if a given value is present in a collection of values, which is a pretty common operation in programming.

🕒List Vs. Tuple — Essential comparison to avoid Python neophyte’s mistakes. -
Easy and clear article tells you, in what cases it's better to use tuple and when - lists. These data types are widely used, in almost every solution. You should clearly understand their purpose and features.

A bit of humour at the end!

🙌 Thanks for your attention! Hope to meet you at CheckiO. We are really interested in your thoughts! Please, leave a comment below! ⤵

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