• This week's mission: House of Mirrors

checkio

Hello CheckiO users! 🙂

đź’Ş Challenge yourself with our latest mission on the Maya island:

The mission is called House of Mirrors created by Phil15 and here you should fill in the plan of where the monsters can be expected in the house.

checkio(('. \\ . /',
         '\\ . . .',
         '/ \\ . \\',
         '. \\ / .'),
        {'ghost': 2,
         'vampire': 2,
         'zombie': 4},
        {'N': [3, 0, 3, 0],
         'S': [2, 1, 1, 4],
         'W': [4, 0, 0, 0],
         'E': [0, 3, 0, 1]}) == ('Z \\ V /',
                                 '\\ Z G V',
                                 '/ \\ Z \\',
                                 'G \\ / Z')

And another mission, you simply have to put your hands on, if you haven't done it yet:

It's called Next Birthday, also created by Phil15, and here you need to find the number of days from today to the closest birthday of one of the family members along with their age.

birthdates = {
    'Brian': (1967, 5, 31),
    'LĂ©na': (1970, 10, 3),
    'Philippe': (1991, 6, 15),
    'Yasmine': (1996, 2, 29),
    'Emma': (2000, 12, 25),
}
next_birthday((2020, 9, 8), birthdates) == (25, {'LĂ©na': 50})
next_birthday((2021, 10, 4), birthdates) == (82, {'Emma': 21})
next_birthday((2022, 3, 1), birthdates) == (0, {'Yasmine': 26})
    đź’ˇ Highlights from the world of Python:
  • For those who have ever had a bug that took ages to fix and made no sense at all, check out the first part of How to Shoot Yourself in the Foot With Python. You’ll see 5 things that have a great potential to drive you mad (Implicit String Concatenation, Walrus WAT, Be Careful When Using += With Lists, Mutable Defaults, Chained Operations Gone Wrong). They will be explained and shown on examples. By learning about them in advanced, you can save hours of debugging time. It’s SO worth it!
  • dry-python/returns@0.15 has been released, which means that now anyone can use our Higher Kinded Types emulation in their Python projects. You simply have to know what Higher Kinded Types (HKTs) are and why they are useful, how they are implemented and what limitations there are, as well as how can you use them in your own projects. It’s very cool!
  • Check out the code isolation in Python. You’ll find interesting techniques with examples, which are useful for people who perform security research or participate in CTF competitions. You’ll know how to hide your code, like compile your Python scripts to bytecode files and bundle them with an interpreter into an executable.

🏋 The users who’ve made the TOP 3 this month are veky, 2010min0ru, and vvm70. You are doing great, guys! Keep on coding!

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